//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension CustomerProfiles {
    // MARK: Enums

    public enum ConflictResolvingModel: String, CustomStringConvertible, Codable, _SotoSendable {
        case recency = "RECENCY"
        case source = "SOURCE"
        public var description: String { return self.rawValue }
    }

    public enum DataPullMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case complete = "Complete"
        case incremental = "Incremental"
        public var description: String { return self.rawValue }
    }

    public enum FieldContentType: String, CustomStringConvertible, Codable, _SotoSendable {
        case emailAddress = "EMAIL_ADDRESS"
        case name = "NAME"
        case number = "NUMBER"
        case phoneNumber = "PHONE_NUMBER"
        case string = "STRING"
        public var description: String { return self.rawValue }
    }

    public enum Gender: String, CustomStringConvertible, Codable, _SotoSendable {
        case female = "FEMALE"
        case male = "MALE"
        case unspecified = "UNSPECIFIED"
        public var description: String { return self.rawValue }
    }

    public enum IdentityResolutionJobStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case completed = "COMPLETED"
        case failed = "FAILED"
        case findMatching = "FIND_MATCHING"
        case merging = "MERGING"
        case partialSuccess = "PARTIAL_SUCCESS"
        case pending = "PENDING"
        case preprocessing = "PREPROCESSING"
        public var description: String { return self.rawValue }
    }

    public enum JobScheduleDayOfTheWeek: String, CustomStringConvertible, Codable, _SotoSendable {
        case friday = "FRIDAY"
        case monday = "MONDAY"
        case saturday = "SATURDAY"
        case sunday = "SUNDAY"
        case thursday = "THURSDAY"
        case tuesday = "TUESDAY"
        case wednesday = "WEDNESDAY"
        public var description: String { return self.rawValue }
    }

    public enum LogicalOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case and = "AND"
        case or = "OR"
        public var description: String { return self.rawValue }
    }

    public enum MarketoConnectorOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case addition = "ADDITION"
        case between = "BETWEEN"
        case division = "DIVISION"
        case greaterThan = "GREATER_THAN"
        case lessThan = "LESS_THAN"
        case maskAll = "MASK_ALL"
        case maskFirstN = "MASK_FIRST_N"
        case maskLastN = "MASK_LAST_N"
        case multiplication = "MULTIPLICATION"
        case noOp = "NO_OP"
        case projection = "PROJECTION"
        case subtraction = "SUBTRACTION"
        case validateNonNegative = "VALIDATE_NON_NEGATIVE"
        case validateNonNull = "VALIDATE_NON_NULL"
        case validateNonZero = "VALIDATE_NON_ZERO"
        case validateNumeric = "VALIDATE_NUMERIC"
        public var description: String { return self.rawValue }
    }

    public enum OperatorPropertiesKeys: String, CustomStringConvertible, Codable, _SotoSendable {
        case concatFormat = "CONCAT_FORMAT"
        case dataType = "DATA_TYPE"
        case destinationDataType = "DESTINATION_DATA_TYPE"
        case lowerBound = "LOWER_BOUND"
        case maskLength = "MASK_LENGTH"
        case maskValue = "MASK_VALUE"
        case mathOperationFieldsOrder = "MATH_OPERATION_FIELDS_ORDER"
        case sourceDataType = "SOURCE_DATA_TYPE"
        case subfieldCategoryMap = "SUBFIELD_CATEGORY_MAP"
        case truncateLength = "TRUNCATE_LENGTH"
        case upperBound = "UPPER_BOUND"
        case validationAction = "VALIDATION_ACTION"
        case value = "VALUE"
        case values = "VALUES"
        public var description: String { return self.rawValue }
    }

    public enum PartyType: String, CustomStringConvertible, Codable, _SotoSendable {
        case business = "BUSINESS"
        case individual = "INDIVIDUAL"
        case other = "OTHER"
        public var description: String { return self.rawValue }
    }

    public enum S3ConnectorOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case addition = "ADDITION"
        case between = "BETWEEN"
        case division = "DIVISION"
        case equalTo = "EQUAL_TO"
        case greaterThan = "GREATER_THAN"
        case greaterThanOrEqualTo = "GREATER_THAN_OR_EQUAL_TO"
        case lessThan = "LESS_THAN"
        case lessThanOrEqualTo = "LESS_THAN_OR_EQUAL_TO"
        case maskAll = "MASK_ALL"
        case maskFirstN = "MASK_FIRST_N"
        case maskLastN = "MASK_LAST_N"
        case multiplication = "MULTIPLICATION"
        case noOp = "NO_OP"
        case notEqualTo = "NOT_EQUAL_TO"
        case projection = "PROJECTION"
        case subtraction = "SUBTRACTION"
        case validateNonNegative = "VALIDATE_NON_NEGATIVE"
        case validateNonNull = "VALIDATE_NON_NULL"
        case validateNonZero = "VALIDATE_NON_ZERO"
        case validateNumeric = "VALIDATE_NUMERIC"
        public var description: String { return self.rawValue }
    }

    public enum SalesforceConnectorOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case addition = "ADDITION"
        case between = "BETWEEN"
        case contains = "CONTAINS"
        case division = "DIVISION"
        case equalTo = "EQUAL_TO"
        case greaterThan = "GREATER_THAN"
        case greaterThanOrEqualTo = "GREATER_THAN_OR_EQUAL_TO"
        case lessThan = "LESS_THAN"
        case lessThanOrEqualTo = "LESS_THAN_OR_EQUAL_TO"
        case maskAll = "MASK_ALL"
        case maskFirstN = "MASK_FIRST_N"
        case maskLastN = "MASK_LAST_N"
        case multiplication = "MULTIPLICATION"
        case noOp = "NO_OP"
        case notEqualTo = "NOT_EQUAL_TO"
        case projection = "PROJECTION"
        case subtraction = "SUBTRACTION"
        case validateNonNegative = "VALIDATE_NON_NEGATIVE"
        case validateNonNull = "VALIDATE_NON_NULL"
        case validateNonZero = "VALIDATE_NON_ZERO"
        case validateNumeric = "VALIDATE_NUMERIC"
        public var description: String { return self.rawValue }
    }

    public enum ServiceNowConnectorOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case addition = "ADDITION"
        case between = "BETWEEN"
        case contains = "CONTAINS"
        case division = "DIVISION"
        case equalTo = "EQUAL_TO"
        case greaterThan = "GREATER_THAN"
        case greaterThanOrEqualTo = "GREATER_THAN_OR_EQUAL_TO"
        case lessThan = "LESS_THAN"
        case lessThanOrEqualTo = "LESS_THAN_OR_EQUAL_TO"
        case maskAll = "MASK_ALL"
        case maskFirstN = "MASK_FIRST_N"
        case maskLastN = "MASK_LAST_N"
        case multiplication = "MULTIPLICATION"
        case noOp = "NO_OP"
        case notEqualTo = "NOT_EQUAL_TO"
        case projection = "PROJECTION"
        case subtraction = "SUBTRACTION"
        case validateNonNegative = "VALIDATE_NON_NEGATIVE"
        case validateNonNull = "VALIDATE_NON_NULL"
        case validateNonZero = "VALIDATE_NON_ZERO"
        case validateNumeric = "VALIDATE_NUMERIC"
        public var description: String { return self.rawValue }
    }

    public enum SourceConnectorType: String, CustomStringConvertible, Codable, _SotoSendable {
        case marketo = "Marketo"
        case s3 = "S3"
        case salesforce = "Salesforce"
        case servicenow = "Servicenow"
        case zendesk = "Zendesk"
        public var description: String { return self.rawValue }
    }

    public enum StandardIdentifier: String, CustomStringConvertible, Codable, _SotoSendable {
        case `case` = "CASE"
        case asset = "ASSET"
        case lookupOnly = "LOOKUP_ONLY"
        case newOnly = "NEW_ONLY"
        case order = "ORDER"
        case profile = "PROFILE"
        case secondary = "SECONDARY"
        case unique = "UNIQUE"
        public var description: String { return self.rawValue }
    }

    public enum Status: String, CustomStringConvertible, Codable, _SotoSendable {
        case cancelled = "CANCELLED"
        case complete = "COMPLETE"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case notStarted = "NOT_STARTED"
        case retry = "RETRY"
        case split = "SPLIT"
        public var description: String { return self.rawValue }
    }

    public enum TaskType: String, CustomStringConvertible, Codable, _SotoSendable {
        case arithmetic = "Arithmetic"
        case filter = "Filter"
        case map = "Map"
        case mask = "Mask"
        case merge = "Merge"
        case truncate = "Truncate"
        case validate = "Validate"
        public var description: String { return self.rawValue }
    }

    public enum TriggerType: String, CustomStringConvertible, Codable, _SotoSendable {
        case event = "Event"
        case ondemand = "OnDemand"
        case scheduled = "Scheduled"
        public var description: String { return self.rawValue }
    }

    public enum WorkflowType: String, CustomStringConvertible, Codable, _SotoSendable {
        case appflowIntegration = "APPFLOW_INTEGRATION"
        public var description: String { return self.rawValue }
    }

    public enum ZendeskConnectorOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case addition = "ADDITION"
        case division = "DIVISION"
        case greaterThan = "GREATER_THAN"
        case maskAll = "MASK_ALL"
        case maskFirstN = "MASK_FIRST_N"
        case maskLastN = "MASK_LAST_N"
        case multiplication = "MULTIPLICATION"
        case noOp = "NO_OP"
        case projection = "PROJECTION"
        case subtraction = "SUBTRACTION"
        case validateNonNegative = "VALIDATE_NON_NEGATIVE"
        case validateNonNull = "VALIDATE_NON_NULL"
        case validateNonZero = "VALIDATE_NON_ZERO"
        case validateNumeric = "VALIDATE_NUMERIC"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AddProfileKeyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// A searchable identifier of a customer profile. The predefined keys you can use include: _account, _profileId, _assetId, _caseId, _orderId, _fullName, _phone, _email, _ctrContactId, _marketoLeadId, _salesforceAccountId, _salesforceContactId, _salesforceAssetId, _zendeskUserId, _zendeskExternalId, _zendeskTicketId, _serviceNowSystemId, _serviceNowIncidentId, _segmentUserId, _shopifyCustomerId, _shopifyOrderId.
        public let keyName: String
        /// The unique identifier of a customer profile.
        public let profileId: String
        /// A list of key values.
        public let values: [String]

        public init(domainName: String, keyName: String, profileId: String, values: [String]) {
            self.domainName = domainName
            self.keyName = keyName
            self.profileId = profileId
            self.values = values
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.keyName, name: "keyName", parent: name, max: 64)
            try self.validate(self.keyName, name: "keyName", parent: name, min: 1)
            try self.validate(self.keyName, name: "keyName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.profileId, name: "profileId", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 255)
                try validate($0, name: "values[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case keyName = "KeyName"
            case profileId = "ProfileId"
            case values = "Values"
        }
    }

    public struct AddProfileKeyResponse: AWSDecodableShape {
        /// A searchable identifier of a customer profile.
        public let keyName: String?
        /// A list of key values.
        public let values: [String]?

        public init(keyName: String? = nil, values: [String]? = nil) {
            self.keyName = keyName
            self.values = values
        }

        private enum CodingKeys: String, CodingKey {
            case keyName = "KeyName"
            case values = "Values"
        }
    }

    public struct AdditionalSearchKey: AWSEncodableShape {
        /// A searchable identifier of a customer profile.
        public let keyName: String
        /// A list of key values.
        public let values: [String]

        public init(keyName: String, values: [String]) {
            self.keyName = keyName
            self.values = values
        }

        public func validate(name: String) throws {
            try self.validate(self.keyName, name: "keyName", parent: name, max: 64)
            try self.validate(self.keyName, name: "keyName", parent: name, min: 1)
            try self.validate(self.keyName, name: "keyName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 255)
                try validate($0, name: "values[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case keyName = "KeyName"
            case values = "Values"
        }
    }

    public struct Address: AWSEncodableShape & AWSDecodableShape {
        /// The first line of a customer address.
        public let address1: String?
        /// The second line of a customer address.
        public let address2: String?
        /// The third line of a customer address.
        public let address3: String?
        /// The fourth line of a customer address.
        public let address4: String?
        /// The city in which a customer lives.
        public let city: String?
        /// The country in which a customer lives.
        public let country: String?
        /// The county in which a customer lives.
        public let county: String?
        /// The postal code of a customer address.
        public let postalCode: String?
        /// The province in which a customer lives.
        public let province: String?
        /// The state in which a customer lives.
        public let state: String?

        public init(address1: String? = nil, address2: String? = nil, address3: String? = nil, address4: String? = nil, city: String? = nil, country: String? = nil, county: String? = nil, postalCode: String? = nil, province: String? = nil, state: String? = nil) {
            self.address1 = address1
            self.address2 = address2
            self.address3 = address3
            self.address4 = address4
            self.city = city
            self.country = country
            self.county = county
            self.postalCode = postalCode
            self.province = province
            self.state = state
        }

        public func validate(name: String) throws {
            try self.validate(self.address1, name: "address1", parent: name, max: 255)
            try self.validate(self.address1, name: "address1", parent: name, min: 1)
            try self.validate(self.address2, name: "address2", parent: name, max: 255)
            try self.validate(self.address2, name: "address2", parent: name, min: 1)
            try self.validate(self.address3, name: "address3", parent: name, max: 255)
            try self.validate(self.address3, name: "address3", parent: name, min: 1)
            try self.validate(self.address4, name: "address4", parent: name, max: 255)
            try self.validate(self.address4, name: "address4", parent: name, min: 1)
            try self.validate(self.city, name: "city", parent: name, max: 255)
            try self.validate(self.city, name: "city", parent: name, min: 1)
            try self.validate(self.country, name: "country", parent: name, max: 255)
            try self.validate(self.country, name: "country", parent: name, min: 1)
            try self.validate(self.county, name: "county", parent: name, max: 255)
            try self.validate(self.county, name: "county", parent: name, min: 1)
            try self.validate(self.postalCode, name: "postalCode", parent: name, max: 255)
            try self.validate(self.postalCode, name: "postalCode", parent: name, min: 1)
            try self.validate(self.province, name: "province", parent: name, max: 255)
            try self.validate(self.province, name: "province", parent: name, min: 1)
            try self.validate(self.state, name: "state", parent: name, max: 255)
            try self.validate(self.state, name: "state", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case address1 = "Address1"
            case address2 = "Address2"
            case address3 = "Address3"
            case address4 = "Address4"
            case city = "City"
            case country = "Country"
            case county = "County"
            case postalCode = "PostalCode"
            case province = "Province"
            case state = "State"
        }
    }

    public struct AppflowIntegration: AWSEncodableShape {
        /// Batches in workflow of type APPFLOW_INTEGRATION.
        public let batches: [Batch]?
        public let flowDefinition: FlowDefinition

        public init(batches: [Batch]? = nil, flowDefinition: FlowDefinition) {
            self.batches = batches
            self.flowDefinition = flowDefinition
        }

        public func validate(name: String) throws {
            try self.flowDefinition.validate(name: "\(name).flowDefinition")
        }

        private enum CodingKeys: String, CodingKey {
            case batches = "Batches"
            case flowDefinition = "FlowDefinition"
        }
    }

    public struct AppflowIntegrationWorkflowAttributes: AWSDecodableShape {
        /// The name of the AppFlow connector profile used for ingestion.
        public let connectorProfileName: String
        /// The Amazon Resource Name (ARN) of the IAM role. Customer Profiles assumes this role to create resources on your behalf as part of workflow execution.
        public let roleArn: String?
        /// Specifies the source connector type, such as Salesforce, ServiceNow, and Marketo. Indicates source of ingestion.
        public let sourceConnectorType: SourceConnectorType

        public init(connectorProfileName: String, roleArn: String? = nil, sourceConnectorType: SourceConnectorType) {
            self.connectorProfileName = connectorProfileName
            self.roleArn = roleArn
            self.sourceConnectorType = sourceConnectorType
        }

        private enum CodingKeys: String, CodingKey {
            case connectorProfileName = "ConnectorProfileName"
            case roleArn = "RoleArn"
            case sourceConnectorType = "SourceConnectorType"
        }
    }

    public struct AppflowIntegrationWorkflowMetrics: AWSDecodableShape {
        /// Number of records processed in APPFLOW_INTEGRATION workflow.
        public let recordsProcessed: Int64
        /// Total steps completed in APPFLOW_INTEGRATION workflow.
        public let stepsCompleted: Int64
        /// Total steps in APPFLOW_INTEGRATION workflow.
        public let totalSteps: Int64

        public init(recordsProcessed: Int64, stepsCompleted: Int64, totalSteps: Int64) {
            self.recordsProcessed = recordsProcessed
            self.stepsCompleted = stepsCompleted
            self.totalSteps = totalSteps
        }

        private enum CodingKeys: String, CodingKey {
            case recordsProcessed = "RecordsProcessed"
            case stepsCompleted = "StepsCompleted"
            case totalSteps = "TotalSteps"
        }
    }

    public struct AppflowIntegrationWorkflowStep: AWSDecodableShape {
        /// End datetime of records pulled in batch during execution of workflow step for APPFLOW_INTEGRATION workflow.
        public let batchRecordsEndTime: String
        /// Start datetime of records pulled in batch during execution of workflow step for APPFLOW_INTEGRATION workflow.
        public let batchRecordsStartTime: String
        /// Creation timestamp of workflow step for APPFLOW_INTEGRATION workflow.
        public let createdAt: Date
        /// Message indicating execution of workflow step for APPFLOW_INTEGRATION workflow.
        public let executionMessage: String
        /// Name of the flow created during execution of workflow step. APPFLOW_INTEGRATION workflow type creates an appflow flow during workflow step execution on the customers behalf.
        public let flowName: String
        /// Last updated timestamp for workflow step for APPFLOW_INTEGRATION workflow.
        public let lastUpdatedAt: Date
        /// Total number of records processed during execution of workflow step for APPFLOW_INTEGRATION workflow.
        public let recordsProcessed: Int64
        /// Workflow step status for APPFLOW_INTEGRATION workflow.
        public let status: Status

        public init(batchRecordsEndTime: String, batchRecordsStartTime: String, createdAt: Date, executionMessage: String, flowName: String, lastUpdatedAt: Date, recordsProcessed: Int64, status: Status) {
            self.batchRecordsEndTime = batchRecordsEndTime
            self.batchRecordsStartTime = batchRecordsStartTime
            self.createdAt = createdAt
            self.executionMessage = executionMessage
            self.flowName = flowName
            self.lastUpdatedAt = lastUpdatedAt
            self.recordsProcessed = recordsProcessed
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case batchRecordsEndTime = "BatchRecordsEndTime"
            case batchRecordsStartTime = "BatchRecordsStartTime"
            case createdAt = "CreatedAt"
            case executionMessage = "ExecutionMessage"
            case flowName = "FlowName"
            case lastUpdatedAt = "LastUpdatedAt"
            case recordsProcessed = "RecordsProcessed"
            case status = "Status"
        }
    }

    public struct AutoMerging: AWSEncodableShape & AWSDecodableShape {
        /// How the auto-merging process should resolve conflicts between different profiles. For example, if Profile A and Profile B have the same FirstName and LastName (and that is the matching criteria), which EmailAddress should be used?
        public let conflictResolution: ConflictResolution?
        /// A list of matching attributes that represent matching criteria. If two profiles meet at least one of the requirements in the matching attributes list, they will be merged.
        public let consolidation: Consolidation?
        /// The flag that enables the auto-merging of duplicate profiles.
        public let enabled: Bool
        /// A number between 0 and 1 that represents the minimum confidence score required for profiles within a matching group to be merged during the auto-merge process. A higher score means higher similarity required to merge profiles.
        public let minAllowedConfidenceScoreForMerging: Double?

        public init(conflictResolution: ConflictResolution? = nil, consolidation: Consolidation? = nil, enabled: Bool, minAllowedConfidenceScoreForMerging: Double? = nil) {
            self.conflictResolution = conflictResolution
            self.consolidation = consolidation
            self.enabled = enabled
            self.minAllowedConfidenceScoreForMerging = minAllowedConfidenceScoreForMerging
        }

        public func validate(name: String) throws {
            try self.conflictResolution?.validate(name: "\(name).conflictResolution")
            try self.consolidation?.validate(name: "\(name).consolidation")
            try self.validate(self.minAllowedConfidenceScoreForMerging, name: "minAllowedConfidenceScoreForMerging", parent: name, max: 1.0)
            try self.validate(self.minAllowedConfidenceScoreForMerging, name: "minAllowedConfidenceScoreForMerging", parent: name, min: 0.0)
        }

        private enum CodingKeys: String, CodingKey {
            case conflictResolution = "ConflictResolution"
            case consolidation = "Consolidation"
            case enabled = "Enabled"
            case minAllowedConfidenceScoreForMerging = "MinAllowedConfidenceScoreForMerging"
        }
    }

    public struct Batch: AWSEncodableShape {
        /// End time of batch to split ingestion.
        public let endTime: Date
        /// Start time of batch to split ingestion.
        public let startTime: Date

        public init(endTime: Date, startTime: Date) {
            self.endTime = endTime
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case startTime = "StartTime"
        }
    }

    public struct ConflictResolution: AWSEncodableShape & AWSDecodableShape {
        /// How the auto-merging process should resolve conflicts between different profiles.    RECENCY: Uses the data that was most recently updated.    SOURCE: Uses the data from a specific source. For example, if a company has been aquired or two departments have merged, data from the specified source is used. If two duplicate profiles are from the same source, then RECENCY is used again.
        public let conflictResolvingModel: ConflictResolvingModel
        /// The ObjectType name that is used to resolve profile merging conflicts when choosing SOURCE as the ConflictResolvingModel.
        public let sourceName: String?

        public init(conflictResolvingModel: ConflictResolvingModel, sourceName: String? = nil) {
            self.conflictResolvingModel = conflictResolvingModel
            self.sourceName = sourceName
        }

        public func validate(name: String) throws {
            try self.validate(self.sourceName, name: "sourceName", parent: name, max: 255)
            try self.validate(self.sourceName, name: "sourceName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case conflictResolvingModel = "ConflictResolvingModel"
            case sourceName = "SourceName"
        }
    }

    public struct ConnectorOperator: AWSEncodableShape {
        /// The operation to be performed on the provided Marketo source fields.
        public let marketo: MarketoConnectorOperator?
        /// The operation to be performed on the provided Amazon S3 source fields.
        public let s3: S3ConnectorOperator?
        /// The operation to be performed on the provided Salesforce source fields.
        public let salesforce: SalesforceConnectorOperator?
        /// The operation to be performed on the provided ServiceNow source fields.
        public let serviceNow: ServiceNowConnectorOperator?
        /// The operation to be performed on the provided Zendesk source fields.
        public let zendesk: ZendeskConnectorOperator?

        public init(marketo: MarketoConnectorOperator? = nil, s3: S3ConnectorOperator? = nil, salesforce: SalesforceConnectorOperator? = nil, serviceNow: ServiceNowConnectorOperator? = nil, zendesk: ZendeskConnectorOperator? = nil) {
            self.marketo = marketo
            self.s3 = s3
            self.salesforce = salesforce
            self.serviceNow = serviceNow
            self.zendesk = zendesk
        }

        private enum CodingKeys: String, CodingKey {
            case marketo = "Marketo"
            case s3 = "S3"
            case salesforce = "Salesforce"
            case serviceNow = "ServiceNow"
            case zendesk = "Zendesk"
        }
    }

    public struct Consolidation: AWSEncodableShape & AWSDecodableShape {
        /// A list of matching criteria.
        public let matchingAttributesList: [[String]]

        public init(matchingAttributesList: [[String]]) {
            self.matchingAttributesList = matchingAttributesList
        }

        public func validate(name: String) throws {
            try self.matchingAttributesList.forEach {
                try validate($0, name: "matchingAttributesList[]", parent: name, max: 20)
                try validate($0, name: "matchingAttributesList[]", parent: name, min: 1)
            }
            try self.validate(self.matchingAttributesList, name: "matchingAttributesList", parent: name, max: 10)
            try self.validate(self.matchingAttributesList, name: "matchingAttributesList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case matchingAttributesList = "MatchingAttributesList"
        }
    }

    public struct CreateDomainRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.
        public let deadLetterQueueUrl: String?
        /// The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage.
        public let defaultEncryptionKey: String?
        /// The default number of days until the data within the domain expires.
        public let defaultExpirationDays: Int
        /// The unique name of the domain.
        public let domainName: String
        /// The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly
        /// batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every
        /// Saturday at 12AM UTC to detect duplicate profiles in your domains.  After the Identity Resolution Job completes, use the
        /// GetMatches
        /// API to return and review the results. Or, if you have configured ExportingConfig in the MatchingRequest, you can download the results from
        /// S3.
        public let matching: MatchingRequest?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?

        public init(deadLetterQueueUrl: String? = nil, defaultEncryptionKey: String? = nil, defaultExpirationDays: Int, domainName: String, matching: MatchingRequest? = nil, tags: [String: String]? = nil) {
            self.deadLetterQueueUrl = deadLetterQueueUrl
            self.defaultEncryptionKey = defaultEncryptionKey
            self.defaultExpirationDays = defaultExpirationDays
            self.domainName = domainName
            self.matching = matching
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.deadLetterQueueUrl, name: "deadLetterQueueUrl", parent: name, max: 255)
            try self.validate(self.defaultEncryptionKey, name: "defaultEncryptionKey", parent: name, max: 255)
            try self.validate(self.defaultExpirationDays, name: "defaultExpirationDays", parent: name, max: 1098)
            try self.validate(self.defaultExpirationDays, name: "defaultExpirationDays", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.matching?.validate(name: "\(name).matching")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deadLetterQueueUrl = "DeadLetterQueueUrl"
            case defaultEncryptionKey = "DefaultEncryptionKey"
            case defaultExpirationDays = "DefaultExpirationDays"
            case matching = "Matching"
            case tags = "Tags"
        }
    }

    public struct CreateDomainResponse: AWSDecodableShape {
        /// The timestamp of when the domain was created.
        public let createdAt: Date
        /// The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications.
        public let deadLetterQueueUrl: String?
        /// The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage.
        public let defaultEncryptionKey: String?
        /// The default number of days until the data within the domain expires.
        public let defaultExpirationDays: Int
        /// The unique name of the domain.
        public let domainName: String
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date
        /// The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly
        /// batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every
        /// Saturday at 12AM UTC to detect duplicate profiles in your domains.  After the Identity Resolution Job completes, use the
        /// GetMatches
        /// API to return and review the results. Or, if you have configured ExportingConfig in the MatchingRequest, you can download the results from
        /// S3.
        public let matching: MatchingResponse?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?

        public init(createdAt: Date, deadLetterQueueUrl: String? = nil, defaultEncryptionKey: String? = nil, defaultExpirationDays: Int, domainName: String, lastUpdatedAt: Date, matching: MatchingResponse? = nil, tags: [String: String]? = nil) {
            self.createdAt = createdAt
            self.deadLetterQueueUrl = deadLetterQueueUrl
            self.defaultEncryptionKey = defaultEncryptionKey
            self.defaultExpirationDays = defaultExpirationDays
            self.domainName = domainName
            self.lastUpdatedAt = lastUpdatedAt
            self.matching = matching
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case deadLetterQueueUrl = "DeadLetterQueueUrl"
            case defaultEncryptionKey = "DefaultEncryptionKey"
            case defaultExpirationDays = "DefaultExpirationDays"
            case domainName = "DomainName"
            case lastUpdatedAt = "LastUpdatedAt"
            case matching = "Matching"
            case tags = "Tags"
        }
    }

    public struct CreateIntegrationWorkflowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// Configuration data for integration workflow.
        public let integrationConfig: IntegrationConfig
        /// The name of the profile object type.
        public let objectTypeName: String
        /// The Amazon Resource Name (ARN) of the IAM role. Customer Profiles assumes this role to create resources on your behalf as part of workflow execution.
        public let roleArn: String
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?
        /// The type of workflow. The only supported value is APPFLOW_INTEGRATION.
        public let workflowType: WorkflowType

        public init(domainName: String, integrationConfig: IntegrationConfig, objectTypeName: String, roleArn: String, tags: [String: String]? = nil, workflowType: WorkflowType) {
            self.domainName = domainName
            self.integrationConfig = integrationConfig
            self.objectTypeName = objectTypeName
            self.roleArn = roleArn
            self.tags = tags
            self.workflowType = workflowType
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.integrationConfig.validate(name: "\(name).integrationConfig")
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, max: 255)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, min: 1)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z_0-9-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 512)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws:iam:.*:[0-9]+:")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case integrationConfig = "IntegrationConfig"
            case objectTypeName = "ObjectTypeName"
            case roleArn = "RoleArn"
            case tags = "Tags"
            case workflowType = "WorkflowType"
        }
    }

    public struct CreateIntegrationWorkflowResponse: AWSDecodableShape {
        /// A message indicating create request was received.
        public let message: String
        /// Unique identifier for the workflow.
        public let workflowId: String

        public init(message: String, workflowId: String) {
            self.message = message
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case workflowId = "WorkflowId"
        }
    }

    public struct CreateProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// A unique account number that you have given to the customer.
        public let accountNumber: String?
        /// Any additional information relevant to the customer’s profile.
        public let additionalInformation: String?
        /// A generic address associated with the customer that is not mailing, shipping, or billing.
        public let address: Address?
        /// A key value pair of attributes of a customer profile.
        public let attributes: [String: String]?
        /// The customer’s billing address.
        public let billingAddress: Address?
        /// The customer’s birth date.
        public let birthDate: String?
        /// The customer’s business email address.
        public let businessEmailAddress: String?
        /// The name of the customer’s business.
        public let businessName: String?
        /// The customer’s business phone number.
        public let businessPhoneNumber: String?
        /// The unique name of the domain.
        public let domainName: String
        /// The customer’s email address, which has not been specified as a personal or business address.
        public let emailAddress: String?
        /// The customer’s first name.
        public let firstName: String?
        /// The gender with which the customer identifies.
        public let gender: Gender?
        /// An alternative to Gender which accepts any string as input.
        public let genderString: String?
        /// The customer’s home phone number.
        public let homePhoneNumber: String?
        /// The customer’s last name.
        public let lastName: String?
        /// The customer’s mailing address.
        public let mailingAddress: Address?
        /// The customer’s middle name.
        public let middleName: String?
        /// The customer’s mobile phone number.
        public let mobilePhoneNumber: String?
        /// The type of profile used to describe the customer.
        public let partyType: PartyType?
        /// An alternative to PartyType which accepts any string as input.
        public let partyTypeString: String?
        /// The customer’s personal email address.
        public let personalEmailAddress: String?
        /// The customer’s phone number, which has not been specified as a mobile, home, or business number.
        public let phoneNumber: String?
        /// The customer’s shipping address.
        public let shippingAddress: Address?

        public init(accountNumber: String? = nil, additionalInformation: String? = nil, address: Address? = nil, attributes: [String: String]? = nil, billingAddress: Address? = nil, birthDate: String? = nil, businessEmailAddress: String? = nil, businessName: String? = nil, businessPhoneNumber: String? = nil, domainName: String, emailAddress: String? = nil, firstName: String? = nil, gender: Gender? = nil, genderString: String? = nil, homePhoneNumber: String? = nil, lastName: String? = nil, mailingAddress: Address? = nil, middleName: String? = nil, mobilePhoneNumber: String? = nil, partyType: PartyType? = nil, partyTypeString: String? = nil, personalEmailAddress: String? = nil, phoneNumber: String? = nil, shippingAddress: Address? = nil) {
            self.accountNumber = accountNumber
            self.additionalInformation = additionalInformation
            self.address = address
            self.attributes = attributes
            self.billingAddress = billingAddress
            self.birthDate = birthDate
            self.businessEmailAddress = businessEmailAddress
            self.businessName = businessName
            self.businessPhoneNumber = businessPhoneNumber
            self.domainName = domainName
            self.emailAddress = emailAddress
            self.firstName = firstName
            self.gender = gender
            self.genderString = genderString
            self.homePhoneNumber = homePhoneNumber
            self.lastName = lastName
            self.mailingAddress = mailingAddress
            self.middleName = middleName
            self.mobilePhoneNumber = mobilePhoneNumber
            self.partyType = partyType
            self.partyTypeString = partyTypeString
            self.personalEmailAddress = personalEmailAddress
            self.phoneNumber = phoneNumber
            self.shippingAddress = shippingAddress
        }

        public func validate(name: String) throws {
            try self.validate(self.accountNumber, name: "accountNumber", parent: name, max: 255)
            try self.validate(self.accountNumber, name: "accountNumber", parent: name, min: 1)
            try self.validate(self.additionalInformation, name: "additionalInformation", parent: name, max: 1000)
            try self.validate(self.additionalInformation, name: "additionalInformation", parent: name, min: 1)
            try self.address?.validate(name: "\(name).address")
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 255)
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 255)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.billingAddress?.validate(name: "\(name).billingAddress")
            try self.validate(self.birthDate, name: "birthDate", parent: name, max: 255)
            try self.validate(self.birthDate, name: "birthDate", parent: name, min: 1)
            try self.validate(self.businessEmailAddress, name: "businessEmailAddress", parent: name, max: 255)
            try self.validate(self.businessEmailAddress, name: "businessEmailAddress", parent: name, min: 1)
            try self.validate(self.businessName, name: "businessName", parent: name, max: 255)
            try self.validate(self.businessName, name: "businessName", parent: name, min: 1)
            try self.validate(self.businessPhoneNumber, name: "businessPhoneNumber", parent: name, max: 255)
            try self.validate(self.businessPhoneNumber, name: "businessPhoneNumber", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, max: 255)
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, min: 1)
            try self.validate(self.firstName, name: "firstName", parent: name, max: 255)
            try self.validate(self.firstName, name: "firstName", parent: name, min: 1)
            try self.validate(self.genderString, name: "genderString", parent: name, max: 255)
            try self.validate(self.genderString, name: "genderString", parent: name, min: 1)
            try self.validate(self.homePhoneNumber, name: "homePhoneNumber", parent: name, max: 255)
            try self.validate(self.homePhoneNumber, name: "homePhoneNumber", parent: name, min: 1)
            try self.validate(self.lastName, name: "lastName", parent: name, max: 255)
            try self.validate(self.lastName, name: "lastName", parent: name, min: 1)
            try self.mailingAddress?.validate(name: "\(name).mailingAddress")
            try self.validate(self.middleName, name: "middleName", parent: name, max: 255)
            try self.validate(self.middleName, name: "middleName", parent: name, min: 1)
            try self.validate(self.mobilePhoneNumber, name: "mobilePhoneNumber", parent: name, max: 255)
            try self.validate(self.mobilePhoneNumber, name: "mobilePhoneNumber", parent: name, min: 1)
            try self.validate(self.partyTypeString, name: "partyTypeString", parent: name, max: 255)
            try self.validate(self.partyTypeString, name: "partyTypeString", parent: name, min: 1)
            try self.validate(self.personalEmailAddress, name: "personalEmailAddress", parent: name, max: 255)
            try self.validate(self.personalEmailAddress, name: "personalEmailAddress", parent: name, min: 1)
            try self.validate(self.phoneNumber, name: "phoneNumber", parent: name, max: 255)
            try self.validate(self.phoneNumber, name: "phoneNumber", parent: name, min: 1)
            try self.shippingAddress?.validate(name: "\(name).shippingAddress")
        }

        private enum CodingKeys: String, CodingKey {
            case accountNumber = "AccountNumber"
            case additionalInformation = "AdditionalInformation"
            case address = "Address"
            case attributes = "Attributes"
            case billingAddress = "BillingAddress"
            case birthDate = "BirthDate"
            case businessEmailAddress = "BusinessEmailAddress"
            case businessName = "BusinessName"
            case businessPhoneNumber = "BusinessPhoneNumber"
            case emailAddress = "EmailAddress"
            case firstName = "FirstName"
            case gender = "Gender"
            case genderString = "GenderString"
            case homePhoneNumber = "HomePhoneNumber"
            case lastName = "LastName"
            case mailingAddress = "MailingAddress"
            case middleName = "MiddleName"
            case mobilePhoneNumber = "MobilePhoneNumber"
            case partyType = "PartyType"
            case partyTypeString = "PartyTypeString"
            case personalEmailAddress = "PersonalEmailAddress"
            case phoneNumber = "PhoneNumber"
            case shippingAddress = "ShippingAddress"
        }
    }

    public struct CreateProfileResponse: AWSDecodableShape {
        /// The unique identifier of a customer profile.
        public let profileId: String

        public init(profileId: String) {
            self.profileId = profileId
        }

        private enum CodingKeys: String, CodingKey {
            case profileId = "ProfileId"
        }
    }

    public struct DeleteDomainRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String

        public init(domainName: String) {
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDomainResponse: AWSDecodableShape {
        /// A message that indicates the delete request is done.
        public let message: String

        public init(message: String) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
        }
    }

    public struct DeleteIntegrationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The URI of the S3 bucket or any other type of data source.
        public let uri: String

        public init(domainName: String, uri: String) {
            self.domainName = domainName
            self.uri = uri
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.uri, name: "uri", parent: name, max: 255)
            try self.validate(self.uri, name: "uri", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case uri = "Uri"
        }
    }

    public struct DeleteIntegrationResponse: AWSDecodableShape {
        /// A message that indicates the delete request is done.
        public let message: String

        public init(message: String) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
        }
    }

    public struct DeleteProfileKeyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// A searchable identifier of a customer profile.
        public let keyName: String
        /// The unique identifier of a customer profile.
        public let profileId: String
        /// A list of key values.
        public let values: [String]

        public init(domainName: String, keyName: String, profileId: String, values: [String]) {
            self.domainName = domainName
            self.keyName = keyName
            self.profileId = profileId
            self.values = values
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.keyName, name: "keyName", parent: name, max: 64)
            try self.validate(self.keyName, name: "keyName", parent: name, min: 1)
            try self.validate(self.keyName, name: "keyName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.profileId, name: "profileId", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 255)
                try validate($0, name: "values[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case keyName = "KeyName"
            case profileId = "ProfileId"
            case values = "Values"
        }
    }

    public struct DeleteProfileKeyResponse: AWSDecodableShape {
        /// A message that indicates the delete request is done.
        public let message: String?

        public init(message: String? = nil) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
        }
    }

    public struct DeleteProfileObjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The name of the profile object type.
        public let objectTypeName: String
        /// The unique identifier of a customer profile.
        public let profileId: String
        /// The unique identifier of the profile object generated by the service.
        public let profileObjectUniqueKey: String

        public init(domainName: String, objectTypeName: String, profileId: String, profileObjectUniqueKey: String) {
            self.domainName = domainName
            self.objectTypeName = objectTypeName
            self.profileId = profileId
            self.profileObjectUniqueKey = profileObjectUniqueKey
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, max: 255)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, min: 1)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z_0-9-]*$")
            try self.validate(self.profileId, name: "profileId", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.profileObjectUniqueKey, name: "profileObjectUniqueKey", parent: name, max: 255)
            try self.validate(self.profileObjectUniqueKey, name: "profileObjectUniqueKey", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case objectTypeName = "ObjectTypeName"
            case profileId = "ProfileId"
            case profileObjectUniqueKey = "ProfileObjectUniqueKey"
        }
    }

    public struct DeleteProfileObjectResponse: AWSDecodableShape {
        /// A message that indicates the delete request is done.
        public let message: String?

        public init(message: String? = nil) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
        }
    }

    public struct DeleteProfileObjectTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "objectTypeName", location: .uri("ObjectTypeName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The name of the profile object type.
        public let objectTypeName: String

        public init(domainName: String, objectTypeName: String) {
            self.domainName = domainName
            self.objectTypeName = objectTypeName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, max: 255)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, min: 1)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z_0-9-]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteProfileObjectTypeResponse: AWSDecodableShape {
        /// A message that indicates the delete request is done.
        public let message: String

        public init(message: String) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
        }
    }

    public struct DeleteProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The unique identifier of a customer profile.
        public let profileId: String

        public init(domainName: String, profileId: String) {
            self.domainName = domainName
            self.profileId = profileId
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.profileId, name: "profileId", parent: name, pattern: "^[a-f0-9]{32}$")
        }

        private enum CodingKeys: String, CodingKey {
            case profileId = "ProfileId"
        }
    }

    public struct DeleteProfileResponse: AWSDecodableShape {
        /// A message that indicates the delete request is done.
        public let message: String?

        public init(message: String? = nil) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
        }
    }

    public struct DeleteWorkflowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "workflowId", location: .uri("WorkflowId"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// Unique identifier for the workflow.
        public let workflowId: String

        public init(domainName: String, workflowId: String) {
            self.domainName = domainName
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 255)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteWorkflowResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DomainStats: AWSDecodableShape {
        /// The number of profiles that you are currently paying for in the domain. If you have more than 100 objects associated with a single profile, that profile counts as two profiles. If you have more than 200 objects, that profile counts as three, and so on.
        public let meteringProfileCount: Int64?
        /// The total number of objects in domain.
        public let objectCount: Int64?
        /// The total number of profiles currently in the domain.
        public let profileCount: Int64?
        /// The total size, in bytes, of all objects in the domain.
        public let totalSize: Int64?

        public init(meteringProfileCount: Int64? = nil, objectCount: Int64? = nil, profileCount: Int64? = nil, totalSize: Int64? = nil) {
            self.meteringProfileCount = meteringProfileCount
            self.objectCount = objectCount
            self.profileCount = profileCount
            self.totalSize = totalSize
        }

        private enum CodingKeys: String, CodingKey {
            case meteringProfileCount = "MeteringProfileCount"
            case objectCount = "ObjectCount"
            case profileCount = "ProfileCount"
            case totalSize = "TotalSize"
        }
    }

    public struct ExportingConfig: AWSEncodableShape & AWSDecodableShape {
        /// The S3 location where Identity Resolution Jobs write result files.
        public let s3Exporting: S3ExportingConfig?

        public init(s3Exporting: S3ExportingConfig? = nil) {
            self.s3Exporting = s3Exporting
        }

        public func validate(name: String) throws {
            try self.s3Exporting?.validate(name: "\(name).s3Exporting")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Exporting = "S3Exporting"
        }
    }

    public struct ExportingLocation: AWSDecodableShape {
        /// Information about the S3 location where Identity Resolution Jobs write result files.
        public let s3Exporting: S3ExportingLocation?

        public init(s3Exporting: S3ExportingLocation? = nil) {
            self.s3Exporting = s3Exporting
        }

        private enum CodingKeys: String, CodingKey {
            case s3Exporting = "S3Exporting"
        }
    }

    public struct FieldSourceProfileIds: AWSEncodableShape {
        /// A unique identifier for the account number field to be merged.
        public let accountNumber: String?
        /// A unique identifier for the additional information field to be merged.
        public let additionalInformation: String?
        /// A unique identifier for the party type field to be merged.
        public let address: String?
        /// A unique identifier for the attributes field to be merged.
        public let attributes: [String: String]?
        /// A unique identifier for the billing type field to be merged.
        public let billingAddress: String?
        /// A unique identifier for the birthdate field to be merged.
        public let birthDate: String?
        /// A unique identifier for the party type field to be merged.
        public let businessEmailAddress: String?
        /// A unique identifier for the business name field to be merged.
        public let businessName: String?
        /// A unique identifier for the business phone number field to be merged.
        public let businessPhoneNumber: String?
        /// A unique identifier for the email address field to be merged.
        public let emailAddress: String?
        /// A unique identifier for the first name field to be merged.
        public let firstName: String?
        /// A unique identifier for the gender field to be merged.
        public let gender: String?
        /// A unique identifier for the home phone number field to be merged.
        public let homePhoneNumber: String?
        /// A unique identifier for the last name field to be merged.
        public let lastName: String?
        /// A unique identifier for the mailing address field to be merged.
        public let mailingAddress: String?
        /// A unique identifier for the middle name field to be merged.
        public let middleName: String?
        /// A unique identifier for the mobile phone number field to be merged.
        public let mobilePhoneNumber: String?
        /// A unique identifier for the party type field to be merged.
        public let partyType: String?
        /// A unique identifier for the personal email address field to be merged.
        public let personalEmailAddress: String?
        /// A unique identifier for the phone number field to be merged.
        public let phoneNumber: String?
        /// A unique identifier for the shipping address field to be merged.
        public let shippingAddress: String?

        public init(accountNumber: String? = nil, additionalInformation: String? = nil, address: String? = nil, attributes: [String: String]? = nil, billingAddress: String? = nil, birthDate: String? = nil, businessEmailAddress: String? = nil, businessName: String? = nil, businessPhoneNumber: String? = nil, emailAddress: String? = nil, firstName: String? = nil, gender: String? = nil, homePhoneNumber: String? = nil, lastName: String? = nil, mailingAddress: String? = nil, middleName: String? = nil, mobilePhoneNumber: String? = nil, partyType: String? = nil, personalEmailAddress: String? = nil, phoneNumber: String? = nil, shippingAddress: String? = nil) {
            self.accountNumber = accountNumber
            self.additionalInformation = additionalInformation
            self.address = address
            self.attributes = attributes
            self.billingAddress = billingAddress
            self.birthDate = birthDate
            self.businessEmailAddress = businessEmailAddress
            self.businessName = businessName
            self.businessPhoneNumber = businessPhoneNumber
            self.emailAddress = emailAddress
            self.firstName = firstName
            self.gender = gender
            self.homePhoneNumber = homePhoneNumber
            self.lastName = lastName
            self.mailingAddress = mailingAddress
            self.middleName = middleName
            self.mobilePhoneNumber = mobilePhoneNumber
            self.partyType = partyType
            self.personalEmailAddress = personalEmailAddress
            self.phoneNumber = phoneNumber
            self.shippingAddress = shippingAddress
        }

        public func validate(name: String) throws {
            try self.validate(self.accountNumber, name: "accountNumber", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.additionalInformation, name: "additionalInformation", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.address, name: "address", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 255)
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, pattern: "^[a-f0-9]{32}$")
            }
            try self.validate(self.billingAddress, name: "billingAddress", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.birthDate, name: "birthDate", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.businessEmailAddress, name: "businessEmailAddress", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.businessName, name: "businessName", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.businessPhoneNumber, name: "businessPhoneNumber", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.firstName, name: "firstName", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.gender, name: "gender", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.homePhoneNumber, name: "homePhoneNumber", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.lastName, name: "lastName", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.mailingAddress, name: "mailingAddress", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.middleName, name: "middleName", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.mobilePhoneNumber, name: "mobilePhoneNumber", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.partyType, name: "partyType", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.personalEmailAddress, name: "personalEmailAddress", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.phoneNumber, name: "phoneNumber", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.validate(self.shippingAddress, name: "shippingAddress", parent: name, pattern: "^[a-f0-9]{32}$")
        }

        private enum CodingKeys: String, CodingKey {
            case accountNumber = "AccountNumber"
            case additionalInformation = "AdditionalInformation"
            case address = "Address"
            case attributes = "Attributes"
            case billingAddress = "BillingAddress"
            case birthDate = "BirthDate"
            case businessEmailAddress = "BusinessEmailAddress"
            case businessName = "BusinessName"
            case businessPhoneNumber = "BusinessPhoneNumber"
            case emailAddress = "EmailAddress"
            case firstName = "FirstName"
            case gender = "Gender"
            case homePhoneNumber = "HomePhoneNumber"
            case lastName = "LastName"
            case mailingAddress = "MailingAddress"
            case middleName = "MiddleName"
            case mobilePhoneNumber = "MobilePhoneNumber"
            case partyType = "PartyType"
            case personalEmailAddress = "PersonalEmailAddress"
            case phoneNumber = "PhoneNumber"
            case shippingAddress = "ShippingAddress"
        }
    }

    public struct FlowDefinition: AWSEncodableShape {
        /// A description of the flow you want to create.
        public let description: String?
        /// The specified name of the flow. Use underscores (_) or hyphens (-) only. Spaces are not allowed.
        public let flowName: String
        /// The Amazon Resource Name of the AWS Key Management Service (KMS) key you provide for encryption.
        public let kmsArn: String
        /// The configuration that controls how Customer Profiles retrieves data from the source.
        public let sourceFlowConfig: SourceFlowConfig
        /// A list of tasks that Customer Profiles performs while transferring the data in the flow run.
        public let tasks: [Task]
        /// The trigger settings that determine how and when the flow runs.
        public let triggerConfig: TriggerConfig

        public init(description: String? = nil, flowName: String, kmsArn: String, sourceFlowConfig: SourceFlowConfig, tasks: [Task], triggerConfig: TriggerConfig) {
            self.description = description
            self.flowName = flowName
            self.kmsArn = kmsArn
            self.sourceFlowConfig = sourceFlowConfig
            self.tasks = tasks
            self.triggerConfig = triggerConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 2048)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\w!@#\\-.?,\\s]*$")
            try self.validate(self.flowName, name: "flowName", parent: name, max: 256)
            try self.validate(self.flowName, name: "flowName", parent: name, pattern: "^[a-zA-Z0-9][\\w!@#.-]+$")
            try self.validate(self.kmsArn, name: "kmsArn", parent: name, max: 2048)
            try self.validate(self.kmsArn, name: "kmsArn", parent: name, min: 20)
            try self.validate(self.kmsArn, name: "kmsArn", parent: name, pattern: "^arn:aws:kms:.*:[0-9]+:")
            try self.sourceFlowConfig.validate(name: "\(name).sourceFlowConfig")
            try self.tasks.forEach {
                try $0.validate(name: "\(name).tasks[]")
            }
            try self.triggerConfig.validate(name: "\(name).triggerConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case flowName = "FlowName"
            case kmsArn = "KmsArn"
            case sourceFlowConfig = "SourceFlowConfig"
            case tasks = "Tasks"
            case triggerConfig = "TriggerConfig"
        }
    }

    public struct FoundByKeyValue: AWSDecodableShape {
        /// A searchable identifier of a customer profile.
        public let keyName: String?
        /// A list of key values.
        public let values: [String]?

        public init(keyName: String? = nil, values: [String]? = nil) {
            self.keyName = keyName
            self.values = values
        }

        private enum CodingKeys: String, CodingKey {
            case keyName = "KeyName"
            case values = "Values"
        }
    }

    public struct GetAutoMergingPreviewRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// How the auto-merging process should resolve conflicts between different profiles.
        public let conflictResolution: ConflictResolution
        /// A list of matching attributes that represent matching criteria.
        public let consolidation: Consolidation
        /// The unique name of the domain.
        public let domainName: String
        /// Minimum confidence score required for profiles within a matching group to be merged during the auto-merge process.
        public let minAllowedConfidenceScoreForMerging: Double?

        public init(conflictResolution: ConflictResolution, consolidation: Consolidation, domainName: String, minAllowedConfidenceScoreForMerging: Double? = nil) {
            self.conflictResolution = conflictResolution
            self.consolidation = consolidation
            self.domainName = domainName
            self.minAllowedConfidenceScoreForMerging = minAllowedConfidenceScoreForMerging
        }

        public func validate(name: String) throws {
            try self.conflictResolution.validate(name: "\(name).conflictResolution")
            try self.consolidation.validate(name: "\(name).consolidation")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.minAllowedConfidenceScoreForMerging, name: "minAllowedConfidenceScoreForMerging", parent: name, max: 1.0)
            try self.validate(self.minAllowedConfidenceScoreForMerging, name: "minAllowedConfidenceScoreForMerging", parent: name, min: 0.0)
        }

        private enum CodingKeys: String, CodingKey {
            case conflictResolution = "ConflictResolution"
            case consolidation = "Consolidation"
            case minAllowedConfidenceScoreForMerging = "MinAllowedConfidenceScoreForMerging"
        }
    }

    public struct GetAutoMergingPreviewResponse: AWSDecodableShape {
        /// The unique name of the domain.
        public let domainName: String
        /// The number of match groups in the domain that have been reviewed in this preview dry run.
        public let numberOfMatchesInSample: Int64?
        /// The number of profiles found in this preview dry run.
        public let numberOfProfilesInSample: Int64?
        /// The number of profiles that would be merged if this wasn't a preview dry run.
        public let numberOfProfilesWillBeMerged: Int64?

        public init(domainName: String, numberOfMatchesInSample: Int64? = nil, numberOfProfilesInSample: Int64? = nil, numberOfProfilesWillBeMerged: Int64? = nil) {
            self.domainName = domainName
            self.numberOfMatchesInSample = numberOfMatchesInSample
            self.numberOfProfilesInSample = numberOfProfilesInSample
            self.numberOfProfilesWillBeMerged = numberOfProfilesWillBeMerged
        }

        private enum CodingKeys: String, CodingKey {
            case domainName = "DomainName"
            case numberOfMatchesInSample = "NumberOfMatchesInSample"
            case numberOfProfilesInSample = "NumberOfProfilesInSample"
            case numberOfProfilesWillBeMerged = "NumberOfProfilesWillBeMerged"
        }
    }

    public struct GetDomainRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String

        public init(domainName: String) {
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetDomainResponse: AWSDecodableShape {
        /// The timestamp of when the domain was created.
        public let createdAt: Date
        /// The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications.
        public let deadLetterQueueUrl: String?
        /// The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage.
        public let defaultEncryptionKey: String?
        /// The default number of days until the data within the domain expires.
        public let defaultExpirationDays: Int?
        /// The unique name of the domain.
        public let domainName: String
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date
        /// The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly
        /// batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every
        /// Saturday at 12AM UTC to detect duplicate profiles in your domains.  After the Identity Resolution Job completes, use the
        /// GetMatches
        /// API to return and review the results. Or, if you have configured ExportingConfig in the MatchingRequest, you can download the results from
        /// S3.
        public let matching: MatchingResponse?
        /// Usage-specific statistics about the domain.
        public let stats: DomainStats?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?

        public init(createdAt: Date, deadLetterQueueUrl: String? = nil, defaultEncryptionKey: String? = nil, defaultExpirationDays: Int? = nil, domainName: String, lastUpdatedAt: Date, matching: MatchingResponse? = nil, stats: DomainStats? = nil, tags: [String: String]? = nil) {
            self.createdAt = createdAt
            self.deadLetterQueueUrl = deadLetterQueueUrl
            self.defaultEncryptionKey = defaultEncryptionKey
            self.defaultExpirationDays = defaultExpirationDays
            self.domainName = domainName
            self.lastUpdatedAt = lastUpdatedAt
            self.matching = matching
            self.stats = stats
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case deadLetterQueueUrl = "DeadLetterQueueUrl"
            case defaultEncryptionKey = "DefaultEncryptionKey"
            case defaultExpirationDays = "DefaultExpirationDays"
            case domainName = "DomainName"
            case lastUpdatedAt = "LastUpdatedAt"
            case matching = "Matching"
            case stats = "Stats"
            case tags = "Tags"
        }
    }

    public struct GetIdentityResolutionJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "jobId", location: .uri("JobId"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The unique identifier of the Identity Resolution Job.
        public let jobId: String

        public init(domainName: String, jobId: String) {
            self.domainName = domainName
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-f0-9]{32}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetIdentityResolutionJobResponse: AWSDecodableShape {
        /// Configuration settings for how to perform the auto-merging of profiles.
        public let autoMerging: AutoMerging?
        /// The unique name of the domain.
        public let domainName: String?
        /// The S3 location where the Identity Resolution Job writes result files.
        public let exportingLocation: ExportingLocation?
        /// The timestamp of when the Identity Resolution Job was completed.
        public let jobEndTime: Date?
        /// The timestamp of when the Identity Resolution Job will expire.
        public let jobExpirationTime: Date?
        /// The unique identifier of the Identity Resolution Job.
        public let jobId: String?
        /// The timestamp of when the Identity Resolution Job was started or will be started.
        public let jobStartTime: Date?
        /// Statistics about the Identity Resolution Job.
        public let jobStats: JobStats?
        /// The timestamp of when the Identity Resolution Job was most recently edited.
        public let lastUpdatedAt: Date?
        /// The error messages that are generated when the Identity Resolution Job runs.
        public let message: String?
        /// The status of the Identity Resolution Job.    PENDING: The Identity Resolution Job is scheduled but has not started yet. If you turn off the Identity Resolution feature in your domain, jobs in the PENDING state are deleted.    PREPROCESSING: The Identity Resolution Job is loading your data.    FIND_MATCHING: The Identity Resolution Job is using the machine learning model to identify profiles that belong to the same matching group.    MERGING: The Identity Resolution Job is merging duplicate profiles.    COMPLETED: The Identity Resolution Job completed successfully.    PARTIAL_SUCCESS: There's a system error and not all of the data is merged. The Identity Resolution Job writes a message indicating the source of the problem.    FAILED: The Identity Resolution Job did not merge any data. It writes a message indicating the source of the problem.
        public let status: IdentityResolutionJobStatus?

        public init(autoMerging: AutoMerging? = nil, domainName: String? = nil, exportingLocation: ExportingLocation? = nil, jobEndTime: Date? = nil, jobExpirationTime: Date? = nil, jobId: String? = nil, jobStartTime: Date? = nil, jobStats: JobStats? = nil, lastUpdatedAt: Date? = nil, message: String? = nil, status: IdentityResolutionJobStatus? = nil) {
            self.autoMerging = autoMerging
            self.domainName = domainName
            self.exportingLocation = exportingLocation
            self.jobEndTime = jobEndTime
            self.jobExpirationTime = jobExpirationTime
            self.jobId = jobId
            self.jobStartTime = jobStartTime
            self.jobStats = jobStats
            self.lastUpdatedAt = lastUpdatedAt
            self.message = message
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case autoMerging = "AutoMerging"
            case domainName = "DomainName"
            case exportingLocation = "ExportingLocation"
            case jobEndTime = "JobEndTime"
            case jobExpirationTime = "JobExpirationTime"
            case jobId = "JobId"
            case jobStartTime = "JobStartTime"
            case jobStats = "JobStats"
            case lastUpdatedAt = "LastUpdatedAt"
            case message = "Message"
            case status = "Status"
        }
    }

    public struct GetIntegrationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The URI of the S3 bucket or any other type of data source.
        public let uri: String

        public init(domainName: String, uri: String) {
            self.domainName = domainName
            self.uri = uri
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.uri, name: "uri", parent: name, max: 255)
            try self.validate(self.uri, name: "uri", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case uri = "Uri"
        }
    }

    public struct GetIntegrationResponse: AWSDecodableShape {
        /// The timestamp of when the domain was created.
        public let createdAt: Date
        /// The unique name of the domain.
        public let domainName: String
        /// Boolean to indicate if the Flow associated with the Integration is created via Appflow  console or with ObjectTypeName equals _unstructured via API/CLI in flowDefinition
        public let isUnstructured: Bool?
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date
        /// The name of the profile object type.
        public let objectTypeName: String?
        /// A map in which each key is an event type from an external application such as Segment or Shopify, and each value is an ObjectTypeName (template) used to ingest the event.
        /// It supports the following event types: SegmentIdentify, ShopifyCreateCustomers, ShopifyUpdateCustomers, ShopifyCreateDraftOrders,
        /// ShopifyUpdateDraftOrders, ShopifyCreateOrders, and ShopifyUpdatedOrders.
        public let objectTypeNames: [String: String]?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?
        /// The URI of the S3 bucket or any other type of data source.
        public let uri: String
        /// Unique identifier for the workflow.
        public let workflowId: String?

        public init(createdAt: Date, domainName: String, isUnstructured: Bool? = nil, lastUpdatedAt: Date, objectTypeName: String? = nil, objectTypeNames: [String: String]? = nil, tags: [String: String]? = nil, uri: String, workflowId: String? = nil) {
            self.createdAt = createdAt
            self.domainName = domainName
            self.isUnstructured = isUnstructured
            self.lastUpdatedAt = lastUpdatedAt
            self.objectTypeName = objectTypeName
            self.objectTypeNames = objectTypeNames
            self.tags = tags
            self.uri = uri
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case domainName = "DomainName"
            case isUnstructured = "IsUnstructured"
            case lastUpdatedAt = "LastUpdatedAt"
            case objectTypeName = "ObjectTypeName"
            case objectTypeNames = "ObjectTypeNames"
            case tags = "Tags"
            case uri = "Uri"
            case workflowId = "WorkflowId"
        }
    }

    public struct GetMatchesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous
        /// response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(domainName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.domainName = domainName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetMatchesResponse: AWSDecodableShape {
        /// The list of matched profiles for this instance.
        public let matches: [MatchItem]?
        /// The timestamp this version of Match Result generated.
        public let matchGenerationDate: Date?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// The number of potential matches found.
        public let potentialMatches: Int?

        public init(matches: [MatchItem]? = nil, matchGenerationDate: Date? = nil, nextToken: String? = nil, potentialMatches: Int? = nil) {
            self.matches = matches
            self.matchGenerationDate = matchGenerationDate
            self.nextToken = nextToken
            self.potentialMatches = potentialMatches
        }

        private enum CodingKeys: String, CodingKey {
            case matches = "Matches"
            case matchGenerationDate = "MatchGenerationDate"
            case nextToken = "NextToken"
            case potentialMatches = "PotentialMatches"
        }
    }

    public struct GetProfileObjectTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "objectTypeName", location: .uri("ObjectTypeName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The name of the profile object type.
        public let objectTypeName: String

        public init(domainName: String, objectTypeName: String) {
            self.domainName = domainName
            self.objectTypeName = objectTypeName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, max: 255)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, min: 1)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z_0-9-]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetProfileObjectTypeResponse: AWSDecodableShape {
        /// Indicates whether a profile should be created when data is received if one doesn’t exist for an object of this type. The default is FALSE. If the AllowProfileCreation flag is set to FALSE, then the service tries to fetch a standard profile and associate this object with the profile. If it is set to TRUE, and if no match is found, then the service creates a new standard profile.
        public let allowProfileCreation: Bool?
        /// The timestamp of when the domain was created.
        public let createdAt: Date?
        /// The description of the profile object type.
        public let description: String
        /// The customer-provided key to encrypt the profile object that will be created in this profile object type.
        public let encryptionKey: String?
        /// The number of days until the data in the object expires.
        public let expirationDays: Int?
        /// A map of the name and ObjectType field.
        public let fields: [String: ObjectTypeField]?
        /// A list of unique keys that can be used to map data to the profile.
        public let keys: [String: [ObjectTypeKey]]?
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date?
        /// The name of the profile object type.
        public let objectTypeName: String
        /// The format of your sourceLastUpdatedTimestamp that was previously set up.
        public let sourceLastUpdatedTimestampFormat: String?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?
        /// A unique identifier for the object template.
        public let templateId: String?

        public init(allowProfileCreation: Bool? = nil, createdAt: Date? = nil, description: String, encryptionKey: String? = nil, expirationDays: Int? = nil, fields: [String: ObjectTypeField]? = nil, keys: [String: [ObjectTypeKey]]? = nil, lastUpdatedAt: Date? = nil, objectTypeName: String, sourceLastUpdatedTimestampFormat: String? = nil, tags: [String: String]? = nil, templateId: String? = nil) {
            self.allowProfileCreation = allowProfileCreation
            self.createdAt = createdAt
            self.description = description
            self.encryptionKey = encryptionKey
            self.expirationDays = expirationDays
            self.fields = fields
            self.keys = keys
            self.lastUpdatedAt = lastUpdatedAt
            self.objectTypeName = objectTypeName
            self.sourceLastUpdatedTimestampFormat = sourceLastUpdatedTimestampFormat
            self.tags = tags
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case allowProfileCreation = "AllowProfileCreation"
            case createdAt = "CreatedAt"
            case description = "Description"
            case encryptionKey = "EncryptionKey"
            case expirationDays = "ExpirationDays"
            case fields = "Fields"
            case keys = "Keys"
            case lastUpdatedAt = "LastUpdatedAt"
            case objectTypeName = "ObjectTypeName"
            case sourceLastUpdatedTimestampFormat = "SourceLastUpdatedTimestampFormat"
            case tags = "Tags"
            case templateId = "TemplateId"
        }
    }

    public struct GetProfileObjectTypeTemplateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "templateId", location: .uri("TemplateId"))
        ]

        /// A unique identifier for the object template.
        public let templateId: String

        public init(templateId: String) {
            self.templateId = templateId
        }

        public func validate(name: String) throws {
            try self.validate(self.templateId, name: "templateId", parent: name, max: 64)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetProfileObjectTypeTemplateResponse: AWSDecodableShape {
        /// Indicates whether a profile should be created when data is received if one doesn’t exist for an object of this type. The default is FALSE. If the AllowProfileCreation flag is set to FALSE, then the service tries to fetch a standard profile and associate this object with the profile. If it is set to TRUE, and if no match is found, then the service creates a new standard profile.
        public let allowProfileCreation: Bool?
        /// A map of the name and ObjectType field.
        public let fields: [String: ObjectTypeField]?
        /// A list of unique keys that can be used to map data to the profile.
        public let keys: [String: [ObjectTypeKey]]?
        /// The format of your sourceLastUpdatedTimestamp that was previously set up.
        public let sourceLastUpdatedTimestampFormat: String?
        /// The name of the source of the object template.
        public let sourceName: String?
        /// The source of the object template.
        public let sourceObject: String?
        /// A unique identifier for the object template.
        public let templateId: String?

        public init(allowProfileCreation: Bool? = nil, fields: [String: ObjectTypeField]? = nil, keys: [String: [ObjectTypeKey]]? = nil, sourceLastUpdatedTimestampFormat: String? = nil, sourceName: String? = nil, sourceObject: String? = nil, templateId: String? = nil) {
            self.allowProfileCreation = allowProfileCreation
            self.fields = fields
            self.keys = keys
            self.sourceLastUpdatedTimestampFormat = sourceLastUpdatedTimestampFormat
            self.sourceName = sourceName
            self.sourceObject = sourceObject
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case allowProfileCreation = "AllowProfileCreation"
            case fields = "Fields"
            case keys = "Keys"
            case sourceLastUpdatedTimestampFormat = "SourceLastUpdatedTimestampFormat"
            case sourceName = "SourceName"
            case sourceObject = "SourceObject"
            case templateId = "TemplateId"
        }
    }

    public struct GetWorkflowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "workflowId", location: .uri("WorkflowId"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// Unique identifier for the workflow.
        public let workflowId: String

        public init(domainName: String, workflowId: String) {
            self.domainName = domainName
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-f0-9]{32}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetWorkflowResponse: AWSDecodableShape {
        /// Attributes provided for workflow execution.
        public let attributes: WorkflowAttributes?
        /// Workflow error messages during execution (if any).
        public let errorDescription: String?
        /// The timestamp that represents when workflow execution last updated.
        public let lastUpdatedAt: Date?
        /// Workflow specific execution metrics.
        public let metrics: WorkflowMetrics?
        /// The timestamp that represents when workflow execution started.
        public let startDate: Date?
        /// Status of workflow execution.
        public let status: Status?
        /// Unique identifier for the workflow.
        public let workflowId: String?
        /// The type of workflow. The only supported value is APPFLOW_INTEGRATION.
        public let workflowType: WorkflowType?

        public init(attributes: WorkflowAttributes? = nil, errorDescription: String? = nil, lastUpdatedAt: Date? = nil, metrics: WorkflowMetrics? = nil, startDate: Date? = nil, status: Status? = nil, workflowId: String? = nil, workflowType: WorkflowType? = nil) {
            self.attributes = attributes
            self.errorDescription = errorDescription
            self.lastUpdatedAt = lastUpdatedAt
            self.metrics = metrics
            self.startDate = startDate
            self.status = status
            self.workflowId = workflowId
            self.workflowType = workflowType
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case errorDescription = "ErrorDescription"
            case lastUpdatedAt = "LastUpdatedAt"
            case metrics = "Metrics"
            case startDate = "StartDate"
            case status = "Status"
            case workflowId = "WorkflowId"
            case workflowType = "WorkflowType"
        }
    }

    public struct GetWorkflowStepsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token")),
            AWSMemberEncoding(label: "workflowId", location: .uri("WorkflowId"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous
        /// response in the next request to retrieve the next set of results.
        public let nextToken: String?
        /// Unique identifier for the workflow.
        public let workflowId: String

        public init(domainName: String, maxResults: Int? = nil, nextToken: String? = nil, workflowId: String) {
            self.domainName = domainName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-f0-9]{32}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetWorkflowStepsResponse: AWSDecodableShape {
        /// List containing workflow step details.
        public let items: [WorkflowStepItem]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?
        /// Unique identifier for the workflow.
        public let workflowId: String?
        /// The type of workflow. The only supported value is APPFLOW_INTEGRATION.
        public let workflowType: WorkflowType?

        public init(items: [WorkflowStepItem]? = nil, nextToken: String? = nil, workflowId: String? = nil, workflowType: WorkflowType? = nil) {
            self.items = items
            self.nextToken = nextToken
            self.workflowId = workflowId
            self.workflowType = workflowType
        }

        private enum CodingKeys: String, CodingKey {
            case items = "Items"
            case nextToken = "NextToken"
            case workflowId = "WorkflowId"
            case workflowType = "WorkflowType"
        }
    }

    public struct IdentityResolutionJob: AWSDecodableShape {
        /// The unique name of the domain.
        public let domainName: String?
        /// The S3 location where the Identity Resolution Job writes result files.
        public let exportingLocation: ExportingLocation?
        /// The timestamp of when the job was completed.
        public let jobEndTime: Date?
        /// The unique identifier of the Identity Resolution Job.
        public let jobId: String?
        /// The timestamp of when the job was started or will be started.
        public let jobStartTime: Date?
        /// Statistics about an Identity Resolution Job.
        public let jobStats: JobStats?
        /// The error messages that are generated when the Identity Resolution Job runs.
        public let message: String?
        /// The status of the Identity Resolution Job.    PENDING: The Identity Resolution Job is scheduled but has not started yet. If you turn off the Identity Resolution feature in your domain, jobs in the PENDING state are deleted.    PREPROCESSING: The Identity Resolution Job is loading your data.    FIND_MATCHING: The Identity Resolution Job is using the machine learning model to identify profiles that belong to the same matching group.    MERGING: The Identity Resolution Job is merging duplicate profiles.    COMPLETED: The Identity Resolution Job completed successfully.    PARTIAL_SUCCESS: There's a system error and not all of the data is merged. The Identity Resolution Job writes a message indicating the source of the problem.    FAILED: The Identity Resolution Job did not merge any data. It writes a message indicating the source of the problem.
        public let status: IdentityResolutionJobStatus?

        public init(domainName: String? = nil, exportingLocation: ExportingLocation? = nil, jobEndTime: Date? = nil, jobId: String? = nil, jobStartTime: Date? = nil, jobStats: JobStats? = nil, message: String? = nil, status: IdentityResolutionJobStatus? = nil) {
            self.domainName = domainName
            self.exportingLocation = exportingLocation
            self.jobEndTime = jobEndTime
            self.jobId = jobId
            self.jobStartTime = jobStartTime
            self.jobStats = jobStats
            self.message = message
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case domainName = "DomainName"
            case exportingLocation = "ExportingLocation"
            case jobEndTime = "JobEndTime"
            case jobId = "JobId"
            case jobStartTime = "JobStartTime"
            case jobStats = "JobStats"
            case message = "Message"
            case status = "Status"
        }
    }

    public struct IncrementalPullConfig: AWSEncodableShape {
        /// A field that specifies the date time or timestamp field as the criteria to use when importing incremental records from the source.
        public let datetimeTypeFieldName: String?

        public init(datetimeTypeFieldName: String? = nil) {
            self.datetimeTypeFieldName = datetimeTypeFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.datetimeTypeFieldName, name: "datetimeTypeFieldName", parent: name, max: 256)
            try self.validate(self.datetimeTypeFieldName, name: "datetimeTypeFieldName", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case datetimeTypeFieldName = "DatetimeTypeFieldName"
        }
    }

    public struct IntegrationConfig: AWSEncodableShape {
        /// Configuration data for APPFLOW_INTEGRATION workflow type.
        public let appflowIntegration: AppflowIntegration?

        public init(appflowIntegration: AppflowIntegration? = nil) {
            self.appflowIntegration = appflowIntegration
        }

        public func validate(name: String) throws {
            try self.appflowIntegration?.validate(name: "\(name).appflowIntegration")
        }

        private enum CodingKeys: String, CodingKey {
            case appflowIntegration = "AppflowIntegration"
        }
    }

    public struct JobSchedule: AWSEncodableShape & AWSDecodableShape {
        /// The day when the Identity Resolution Job should run every week.
        public let dayOfTheWeek: JobScheduleDayOfTheWeek
        /// The time when the Identity Resolution Job should run every week.
        public let time: String

        public init(dayOfTheWeek: JobScheduleDayOfTheWeek, time: String) {
            self.dayOfTheWeek = dayOfTheWeek
            self.time = time
        }

        public func validate(name: String) throws {
            try self.validate(self.time, name: "time", parent: name, max: 5)
            try self.validate(self.time, name: "time", parent: name, min: 3)
            try self.validate(self.time, name: "time", parent: name, pattern: "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$")
        }

        private enum CodingKeys: String, CodingKey {
            case dayOfTheWeek = "DayOfTheWeek"
            case time = "Time"
        }
    }

    public struct JobStats: AWSDecodableShape {
        /// The number of matches found.
        public let numberOfMatchesFound: Int64?
        /// The number of merges completed.
        public let numberOfMergesDone: Int64?
        /// The number of profiles reviewed.
        public let numberOfProfilesReviewed: Int64?

        public init(numberOfMatchesFound: Int64? = nil, numberOfMergesDone: Int64? = nil, numberOfProfilesReviewed: Int64? = nil) {
            self.numberOfMatchesFound = numberOfMatchesFound
            self.numberOfMergesDone = numberOfMergesDone
            self.numberOfProfilesReviewed = numberOfProfilesReviewed
        }

        private enum CodingKeys: String, CodingKey {
            case numberOfMatchesFound = "NumberOfMatchesFound"
            case numberOfMergesDone = "NumberOfMergesDone"
            case numberOfProfilesReviewed = "NumberOfProfilesReviewed"
        }
    }

    public struct ListAccountIntegrationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "includeHidden", location: .querystring("include-hidden")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// Boolean to indicate if hidden integration should be returned. Defaults to False.
        public let includeHidden: Bool?
        /// The maximum number of objects returned per page.
        public let maxResults: Int?
        /// The pagination token from the previous ListAccountIntegrations API call.
        public let nextToken: String?
        /// The URI of the S3 bucket or any other type of data source.
        public let uri: String

        public init(includeHidden: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, uri: String) {
            self.includeHidden = includeHidden
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.uri = uri
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.uri, name: "uri", parent: name, max: 255)
            try self.validate(self.uri, name: "uri", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case uri = "Uri"
        }
    }

    public struct ListAccountIntegrationsResponse: AWSDecodableShape {
        /// The list of ListAccountIntegration instances.
        public let items: [ListIntegrationItem]?
        /// The pagination token from the previous ListAccountIntegrations API call.
        public let nextToken: String?

        public init(items: [ListIntegrationItem]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items = "Items"
            case nextToken = "NextToken"
        }
    }

    public struct ListDomainItem: AWSDecodableShape {
        /// The timestamp of when the domain was created.
        public let createdAt: Date
        /// The unique name of the domain.
        public let domainName: String
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?

        public init(createdAt: Date, domainName: String, lastUpdatedAt: Date, tags: [String: String]? = nil) {
            self.createdAt = createdAt
            self.domainName = domainName
            self.lastUpdatedAt = lastUpdatedAt
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case domainName = "DomainName"
            case lastUpdatedAt = "LastUpdatedAt"
            case tags = "Tags"
        }
    }

    public struct ListDomainsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// The maximum number of objects returned per page.
        public let maxResults: Int?
        /// The pagination token from the previous ListDomain API call.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDomainsResponse: AWSDecodableShape {
        /// The list of ListDomains instances.
        public let items: [ListDomainItem]?
        /// The pagination token from the previous ListDomains API call.
        public let nextToken: String?

        public init(items: [ListDomainItem]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items = "Items"
            case nextToken = "NextToken"
        }
    }

    public struct ListIdentityResolutionJobsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous
        /// response in the next request to retrieve the next set of results.
        public let nextToken: String?

        public init(domainName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.domainName = domainName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListIdentityResolutionJobsResponse: AWSDecodableShape {
        /// A list of Identity Resolution Jobs.
        public let identityResolutionJobsList: [IdentityResolutionJob]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?

        public init(identityResolutionJobsList: [IdentityResolutionJob]? = nil, nextToken: String? = nil) {
            self.identityResolutionJobsList = identityResolutionJobsList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case identityResolutionJobsList = "IdentityResolutionJobsList"
            case nextToken = "NextToken"
        }
    }

    public struct ListIntegrationItem: AWSDecodableShape {
        /// The timestamp of when the domain was created.
        public let createdAt: Date
        /// The unique name of the domain.
        public let domainName: String
        /// Boolean to indicate if the Flow associated with the Integration is created via Appflow console or with ObjectTypeName equals _unstructured via API/CLI in flowDefinition
        public let isUnstructured: Bool?
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date
        /// The name of the profile object type.
        public let objectTypeName: String?
        /// A map in which each key is an event type from an external application such as Segment or Shopify, and each value is an ObjectTypeName (template) used to ingest the event.
        /// It supports the following event types: SegmentIdentify, ShopifyCreateCustomers, ShopifyUpdateCustomers, ShopifyCreateDraftOrders,
        /// ShopifyUpdateDraftOrders, ShopifyCreateOrders, and ShopifyUpdatedOrders.
        public let objectTypeNames: [String: String]?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?
        /// The URI of the S3 bucket or any other type of data source.
        public let uri: String
        /// Unique identifier for the workflow.
        public let workflowId: String?

        public init(createdAt: Date, domainName: String, isUnstructured: Bool? = nil, lastUpdatedAt: Date, objectTypeName: String? = nil, objectTypeNames: [String: String]? = nil, tags: [String: String]? = nil, uri: String, workflowId: String? = nil) {
            self.createdAt = createdAt
            self.domainName = domainName
            self.isUnstructured = isUnstructured
            self.lastUpdatedAt = lastUpdatedAt
            self.objectTypeName = objectTypeName
            self.objectTypeNames = objectTypeNames
            self.tags = tags
            self.uri = uri
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case domainName = "DomainName"
            case isUnstructured = "IsUnstructured"
            case lastUpdatedAt = "LastUpdatedAt"
            case objectTypeName = "ObjectTypeName"
            case objectTypeNames = "ObjectTypeNames"
            case tags = "Tags"
            case uri = "Uri"
            case workflowId = "WorkflowId"
        }
    }

    public struct ListIntegrationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "includeHidden", location: .querystring("include-hidden")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// Boolean to indicate if hidden integration should be returned. Defaults to False.
        public let includeHidden: Bool?
        /// The maximum number of objects returned per page.
        public let maxResults: Int?
        /// The pagination token from the previous ListIntegrations API call.
        public let nextToken: String?

        public init(domainName: String, includeHidden: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.domainName = domainName
            self.includeHidden = includeHidden
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListIntegrationsResponse: AWSDecodableShape {
        /// The list of ListIntegrations instances.
        public let items: [ListIntegrationItem]?
        /// The pagination token from the previous ListIntegrations API call.
        public let nextToken: String?

        public init(items: [ListIntegrationItem]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items = "Items"
            case nextToken = "NextToken"
        }
    }

    public struct ListProfileObjectTypeItem: AWSDecodableShape {
        /// The timestamp of when the domain was created.
        public let createdAt: Date?
        /// Description of the profile object type.
        public let description: String
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date?
        /// The name of the profile object type.
        public let objectTypeName: String
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?

        public init(createdAt: Date? = nil, description: String, lastUpdatedAt: Date? = nil, objectTypeName: String, tags: [String: String]? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.lastUpdatedAt = lastUpdatedAt
            self.objectTypeName = objectTypeName
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case description = "Description"
            case lastUpdatedAt = "LastUpdatedAt"
            case objectTypeName = "ObjectTypeName"
            case tags = "Tags"
        }
    }

    public struct ListProfileObjectTypeTemplateItem: AWSDecodableShape {
        /// The name of the source of the object template.
        public let sourceName: String?
        /// The source of the object template.
        public let sourceObject: String?
        /// A unique identifier for the object template.
        public let templateId: String?

        public init(sourceName: String? = nil, sourceObject: String? = nil, templateId: String? = nil) {
            self.sourceName = sourceName
            self.sourceObject = sourceObject
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case sourceName = "SourceName"
            case sourceObject = "SourceObject"
            case templateId = "TemplateId"
        }
    }

    public struct ListProfileObjectTypeTemplatesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// The maximum number of objects returned per page.
        public let maxResults: Int?
        /// The pagination token from the previous ListObjectTypeTemplates API call.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListProfileObjectTypeTemplatesResponse: AWSDecodableShape {
        /// The list of ListProfileObjectType template instances.
        public let items: [ListProfileObjectTypeTemplateItem]?
        /// The pagination token from the previous ListObjectTypeTemplates API call.
        public let nextToken: String?

        public init(items: [ListProfileObjectTypeTemplateItem]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items = "Items"
            case nextToken = "NextToken"
        }
    }

    public struct ListProfileObjectTypesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The maximum number of objects returned per page.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(domainName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.domainName = domainName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListProfileObjectTypesResponse: AWSDecodableShape {
        /// The list of ListProfileObjectTypes instances.
        public let items: [ListProfileObjectTypeItem]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(items: [ListProfileObjectTypeItem]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items = "Items"
            case nextToken = "NextToken"
        }
    }

    public struct ListProfileObjectsItem: AWSDecodableShape {
        /// A JSON representation of a ProfileObject that belongs to a profile.
        public let object: String?
        /// Specifies the kind of object being added to a profile, such as "Salesforce-Account."
        public let objectTypeName: String?
        /// The unique identifier of the ProfileObject generated by the service.
        public let profileObjectUniqueKey: String?

        public init(object: String? = nil, objectTypeName: String? = nil, profileObjectUniqueKey: String? = nil) {
            self.object = object
            self.objectTypeName = objectTypeName
            self.profileObjectUniqueKey = profileObjectUniqueKey
        }

        private enum CodingKeys: String, CodingKey {
            case object = "Object"
            case objectTypeName = "ObjectTypeName"
            case profileObjectUniqueKey = "ProfileObjectUniqueKey"
        }
    }

    public struct ListProfileObjectsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The maximum number of objects returned per page.
        public let maxResults: Int?
        /// The pagination token from the previous call to ListProfileObjects.
        public let nextToken: String?
        /// Applies a filter to the response to include profile objects with the specified index values. This filter is only supported for ObjectTypeName _asset, _case and _order.
        public let objectFilter: ObjectFilter?
        /// The name of the profile object type.
        public let objectTypeName: String
        /// The unique identifier of a customer profile.
        public let profileId: String

        public init(domainName: String, maxResults: Int? = nil, nextToken: String? = nil, objectFilter: ObjectFilter? = nil, objectTypeName: String, profileId: String) {
            self.domainName = domainName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectFilter = objectFilter
            self.objectTypeName = objectTypeName
            self.profileId = profileId
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.objectFilter?.validate(name: "\(name).objectFilter")
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, max: 255)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, min: 1)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z_0-9-]*$")
            try self.validate(self.profileId, name: "profileId", parent: name, pattern: "^[a-f0-9]{32}$")
        }

        private enum CodingKeys: String, CodingKey {
            case objectFilter = "ObjectFilter"
            case objectTypeName = "ObjectTypeName"
            case profileId = "ProfileId"
        }
    }

    public struct ListProfileObjectsResponse: AWSDecodableShape {
        /// The list of ListProfileObject instances.
        public let items: [ListProfileObjectsItem]?
        /// The pagination token from the previous call to ListProfileObjects.
        public let nextToken: String?

        public init(items: [ListProfileObjectsItem]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items = "Items"
            case nextToken = "NextToken"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The ARN of the resource for which you want to view tags.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[a-z0-9]{1,10}:profile$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct ListWorkflowsItem: AWSDecodableShape {
        /// Creation timestamp for workflow.
        public let createdAt: Date
        /// Last updated timestamp for workflow.
        public let lastUpdatedAt: Date
        /// Status of workflow execution.
        public let status: Status
        /// Description for workflow execution status.
        public let statusDescription: String
        /// Unique identifier for the workflow.
        public let workflowId: String
        /// The type of workflow. The only supported value is APPFLOW_INTEGRATION.
        public let workflowType: WorkflowType

        public init(createdAt: Date, lastUpdatedAt: Date, status: Status, statusDescription: String, workflowId: String, workflowType: WorkflowType) {
            self.createdAt = createdAt
            self.lastUpdatedAt = lastUpdatedAt
            self.status = status
            self.statusDescription = statusDescription
            self.workflowId = workflowId
            self.workflowType = workflowType
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case lastUpdatedAt = "LastUpdatedAt"
            case status = "Status"
            case statusDescription = "StatusDescription"
            case workflowId = "WorkflowId"
            case workflowType = "WorkflowType"
        }
    }

    public struct ListWorkflowsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The maximum number of results to return per page.
        public let maxResults: Int?
        /// The token for the next set of results. Use the value returned in the previous
        /// response in the next request to retrieve the next set of results.
        public let nextToken: String?
        /// Retrieve workflows ended after timestamp.
        public let queryEndDate: Date?
        /// Retrieve workflows started after timestamp.
        public let queryStartDate: Date?
        /// Status of workflow execution.
        public let status: Status?
        /// The type of workflow. The only supported value is APPFLOW_INTEGRATION.
        public let workflowType: WorkflowType?

        public init(domainName: String, maxResults: Int? = nil, nextToken: String? = nil, queryEndDate: Date? = nil, queryStartDate: Date? = nil, status: Status? = nil, workflowType: WorkflowType? = nil) {
            self.domainName = domainName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.queryEndDate = queryEndDate
            self.queryStartDate = queryStartDate
            self.status = status
            self.workflowType = workflowType
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queryEndDate = "QueryEndDate"
            case queryStartDate = "QueryStartDate"
            case status = "Status"
            case workflowType = "WorkflowType"
        }
    }

    public struct ListWorkflowsResponse: AWSDecodableShape {
        /// List containing workflow details.
        public let items: [ListWorkflowsItem]?
        /// If there are additional results, this is the token for the next set of results.
        public let nextToken: String?

        public init(items: [ListWorkflowsItem]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items = "Items"
            case nextToken = "NextToken"
        }
    }

    public struct MarketoSourceProperties: AWSEncodableShape {
        /// The object specified in the Marketo flow source.
        public let object: String

        public init(object: String) {
            self.object = object
        }

        public func validate(name: String) throws {
            try self.validate(self.object, name: "object", parent: name, max: 512)
            try self.validate(self.object, name: "object", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case object = "Object"
        }
    }

    public struct MatchItem: AWSDecodableShape {
        /// A number between 0 and 1, where a higher score means higher similarity. Examining match confidence scores lets you distinguish between groups of similar records in which the system is highly confident (which you may decide to merge), groups of similar records about which the system is uncertain (which you may decide to have reviewed by a human), and groups of similar records that the system deems to be unlikely (which you may decide to reject). Given confidence scores vary as per the data input, it should not be used an absolute measure of matching quality.
        public let confidenceScore: Double?
        /// The unique identifiers for this group of profiles that match.
        public let matchId: String?
        /// A list of identifiers for profiles that match.
        public let profileIds: [String]?

        public init(confidenceScore: Double? = nil, matchId: String? = nil, profileIds: [String]? = nil) {
            self.confidenceScore = confidenceScore
            self.matchId = matchId
            self.profileIds = profileIds
        }

        private enum CodingKeys: String, CodingKey {
            case confidenceScore = "ConfidenceScore"
            case matchId = "MatchId"
            case profileIds = "ProfileIds"
        }
    }

    public struct MatchingRequest: AWSEncodableShape {
        /// Configuration information about the auto-merging process.
        public let autoMerging: AutoMerging?
        /// The flag that enables the matching process of duplicate profiles.
        public let enabled: Bool
        /// Configuration information for exporting Identity Resolution results, for example, to an S3 bucket.
        public let exportingConfig: ExportingConfig?
        /// The day and time when do you want to start the Identity Resolution Job every week.
        public let jobSchedule: JobSchedule?

        public init(autoMerging: AutoMerging? = nil, enabled: Bool, exportingConfig: ExportingConfig? = nil, jobSchedule: JobSchedule? = nil) {
            self.autoMerging = autoMerging
            self.enabled = enabled
            self.exportingConfig = exportingConfig
            self.jobSchedule = jobSchedule
        }

        public func validate(name: String) throws {
            try self.autoMerging?.validate(name: "\(name).autoMerging")
            try self.exportingConfig?.validate(name: "\(name).exportingConfig")
            try self.jobSchedule?.validate(name: "\(name).jobSchedule")
        }

        private enum CodingKeys: String, CodingKey {
            case autoMerging = "AutoMerging"
            case enabled = "Enabled"
            case exportingConfig = "ExportingConfig"
            case jobSchedule = "JobSchedule"
        }
    }

    public struct MatchingResponse: AWSDecodableShape {
        /// Configuration information about the auto-merging process.
        public let autoMerging: AutoMerging?
        /// The flag that enables the matching process of duplicate profiles.
        public let enabled: Bool?
        /// Configuration information for exporting Identity Resolution results, for example, to an S3 bucket.
        public let exportingConfig: ExportingConfig?
        /// The day and time when do you want to start the Identity Resolution Job every week.
        public let jobSchedule: JobSchedule?

        public init(autoMerging: AutoMerging? = nil, enabled: Bool? = nil, exportingConfig: ExportingConfig? = nil, jobSchedule: JobSchedule? = nil) {
            self.autoMerging = autoMerging
            self.enabled = enabled
            self.exportingConfig = exportingConfig
            self.jobSchedule = jobSchedule
        }

        private enum CodingKeys: String, CodingKey {
            case autoMerging = "AutoMerging"
            case enabled = "Enabled"
            case exportingConfig = "ExportingConfig"
            case jobSchedule = "JobSchedule"
        }
    }

    public struct MergeProfilesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The identifiers of the fields in the profile that has the information you want to apply to the merge. For example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the EmailAddress field in Profile1.
        public let fieldSourceProfileIds: FieldSourceProfileIds?
        /// The identifier of the profile to be taken.
        public let mainProfileId: String
        /// The identifier of the profile to be merged into MainProfileId.
        public let profileIdsToBeMerged: [String]

        public init(domainName: String, fieldSourceProfileIds: FieldSourceProfileIds? = nil, mainProfileId: String, profileIdsToBeMerged: [String]) {
            self.domainName = domainName
            self.fieldSourceProfileIds = fieldSourceProfileIds
            self.mainProfileId = mainProfileId
            self.profileIdsToBeMerged = profileIdsToBeMerged
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.fieldSourceProfileIds?.validate(name: "\(name).fieldSourceProfileIds")
            try self.validate(self.mainProfileId, name: "mainProfileId", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.profileIdsToBeMerged.forEach {
                try validate($0, name: "profileIdsToBeMerged[]", parent: name, pattern: "^[a-f0-9]{32}$")
            }
            try self.validate(self.profileIdsToBeMerged, name: "profileIdsToBeMerged", parent: name, max: 20)
            try self.validate(self.profileIdsToBeMerged, name: "profileIdsToBeMerged", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case fieldSourceProfileIds = "FieldSourceProfileIds"
            case mainProfileId = "MainProfileId"
            case profileIdsToBeMerged = "ProfileIdsToBeMerged"
        }
    }

    public struct MergeProfilesResponse: AWSDecodableShape {
        /// A message that indicates the merge request is complete.
        public let message: String?

        public init(message: String? = nil) {
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
        }
    }

    public struct ObjectFilter: AWSEncodableShape {
        /// A searchable identifier of a standard profile object. The predefined keys you can use to search for _asset include: _assetId, _assetName, _serialNumber. The predefined keys you can use to search for _case include: _caseId. The predefined keys you can use to search for _order include: _orderId.
        public let keyName: String
        /// A list of key values.
        public let values: [String]

        public init(keyName: String, values: [String]) {
            self.keyName = keyName
            self.values = values
        }

        public func validate(name: String) throws {
            try self.validate(self.keyName, name: "keyName", parent: name, max: 64)
            try self.validate(self.keyName, name: "keyName", parent: name, min: 1)
            try self.validate(self.keyName, name: "keyName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 255)
                try validate($0, name: "values[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case keyName = "KeyName"
            case values = "Values"
        }
    }

    public struct ObjectTypeField: AWSEncodableShape & AWSDecodableShape {
        /// The content type of the field. Used for determining equality when searching.
        public let contentType: FieldContentType?
        /// A field of a ProfileObject. For example: _source.FirstName, where “_source” is a ProfileObjectType of a Zendesk user and “FirstName” is a field in that ObjectType.
        public let source: String?
        /// The location of the data in the standard ProfileObject model. For example: _profile.Address.PostalCode.
        public let target: String?

        public init(contentType: FieldContentType? = nil, source: String? = nil, target: String? = nil) {
            self.contentType = contentType
            self.source = source
            self.target = target
        }

        public func validate(name: String) throws {
            try self.validate(self.source, name: "source", parent: name, max: 1000)
            try self.validate(self.source, name: "source", parent: name, min: 1)
            try self.validate(self.target, name: "target", parent: name, max: 1000)
            try self.validate(self.target, name: "target", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case contentType = "ContentType"
            case source = "Source"
            case target = "Target"
        }
    }

    public struct ObjectTypeKey: AWSEncodableShape & AWSDecodableShape {
        /// The reference for the key name of the fields map.
        public let fieldNames: [String]?
        /// The types of keys that a ProfileObject can have. Each ProfileObject can have only 1 UNIQUE key but multiple PROFILE keys. PROFILE, ASSET, CASE, or ORDER  means that this key can be used to tie an object to a PROFILE, ASSET, CASE, or ORDER respectively. UNIQUE means that it can be used to uniquely identify an object. If a key a is marked as SECONDARY, it will be used to search for profiles after all other PROFILE keys have been searched. A LOOKUP_ONLY key is only used to match a profile but is not persisted to be used for searching of the profile. A NEW_ONLY key is only used if the profile does not already exist before the object is ingested, otherwise it is only used for matching objects to profiles.
        public let standardIdentifiers: [StandardIdentifier]?

        public init(fieldNames: [String]? = nil, standardIdentifiers: [StandardIdentifier]? = nil) {
            self.fieldNames = fieldNames
            self.standardIdentifiers = standardIdentifiers
        }

        public func validate(name: String) throws {
            try self.fieldNames?.forEach {
                try validate($0, name: "fieldNames[]", parent: name, max: 64)
                try validate($0, name: "fieldNames[]", parent: name, min: 1)
                try validate($0, name: "fieldNames[]", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case fieldNames = "FieldNames"
            case standardIdentifiers = "StandardIdentifiers"
        }
    }

    public struct Profile: AWSDecodableShape {
        /// A unique account number that you have given to the customer.
        public let accountNumber: String?
        /// Any additional information relevant to the customer’s profile.
        public let additionalInformation: String?
        /// A generic address associated with the customer that is not mailing, shipping, or billing.
        public let address: Address?
        /// A key value pair of attributes of a customer profile.
        public let attributes: [String: String]?
        /// The customer’s billing address.
        public let billingAddress: Address?
        /// The customer’s birth date.
        public let birthDate: String?
        /// The customer’s business email address.
        public let businessEmailAddress: String?
        /// The name of the customer’s business.
        public let businessName: String?
        /// The customer’s home phone number.
        public let businessPhoneNumber: String?
        /// The customer’s email address, which has not been specified as a personal or business address.
        public let emailAddress: String?
        /// The customer’s first name.
        public let firstName: String?
        /// A list of items used to find a profile returned in a SearchProfiles response. An item is a key-value(s) pair that matches an attribute in the profile. If the optional AdditionalSearchKeys parameter was included in the SearchProfiles request, the FoundByItems list should be interpreted based on the LogicalOperator used in the request:    AND - The profile included in the response matched all of the search keys specified in the request. The FoundByItems will include all of the key-value(s) pairs that were specified in the request (as this is a requirement of AND search logic).    OR - The profile included in the response matched at least one of the search keys specified in the request. The FoundByItems will include each of the key-value(s) pairs that the profile was found by.   The OR relationship is the default behavior if the LogicalOperator parameter is not included in the SearchProfiles request.
        public let foundByItems: [FoundByKeyValue]?
        /// The gender with which the customer identifies.
        public let gender: Gender?
        /// The customer’s home phone number.
        public let homePhoneNumber: String?
        /// The customer’s last name.
        public let lastName: String?
        /// The customer’s mailing address.
        public let mailingAddress: Address?
        /// The customer’s middle name.
        public let middleName: String?
        /// The customer’s mobile phone number.
        public let mobilePhoneNumber: String?
        /// The type of profile used to describe the customer.
        public let partyType: PartyType?
        /// The customer’s personal email address.
        public let personalEmailAddress: String?
        /// The customer's phone number, which has not been specified as a mobile, home, or business number.
        public let phoneNumber: String?
        /// The unique identifier of a customer profile.
        public let profileId: String?
        /// The customer’s shipping address.
        public let shippingAddress: Address?

        public init(accountNumber: String? = nil, additionalInformation: String? = nil, address: Address? = nil, attributes: [String: String]? = nil, billingAddress: Address? = nil, birthDate: String? = nil, businessEmailAddress: String? = nil, businessName: String? = nil, businessPhoneNumber: String? = nil, emailAddress: String? = nil, firstName: String? = nil, foundByItems: [FoundByKeyValue]? = nil, gender: Gender? = nil, homePhoneNumber: String? = nil, lastName: String? = nil, mailingAddress: Address? = nil, middleName: String? = nil, mobilePhoneNumber: String? = nil, partyType: PartyType? = nil, personalEmailAddress: String? = nil, phoneNumber: String? = nil, profileId: String? = nil, shippingAddress: Address? = nil) {
            self.accountNumber = accountNumber
            self.additionalInformation = additionalInformation
            self.address = address
            self.attributes = attributes
            self.billingAddress = billingAddress
            self.birthDate = birthDate
            self.businessEmailAddress = businessEmailAddress
            self.businessName = businessName
            self.businessPhoneNumber = businessPhoneNumber
            self.emailAddress = emailAddress
            self.firstName = firstName
            self.foundByItems = foundByItems
            self.gender = gender
            self.homePhoneNumber = homePhoneNumber
            self.lastName = lastName
            self.mailingAddress = mailingAddress
            self.middleName = middleName
            self.mobilePhoneNumber = mobilePhoneNumber
            self.partyType = partyType
            self.personalEmailAddress = personalEmailAddress
            self.phoneNumber = phoneNumber
            self.profileId = profileId
            self.shippingAddress = shippingAddress
        }

        private enum CodingKeys: String, CodingKey {
            case accountNumber = "AccountNumber"
            case additionalInformation = "AdditionalInformation"
            case address = "Address"
            case attributes = "Attributes"
            case billingAddress = "BillingAddress"
            case birthDate = "BirthDate"
            case businessEmailAddress = "BusinessEmailAddress"
            case businessName = "BusinessName"
            case businessPhoneNumber = "BusinessPhoneNumber"
            case emailAddress = "EmailAddress"
            case firstName = "FirstName"
            case foundByItems = "FoundByItems"
            case gender = "Gender"
            case homePhoneNumber = "HomePhoneNumber"
            case lastName = "LastName"
            case mailingAddress = "MailingAddress"
            case middleName = "MiddleName"
            case mobilePhoneNumber = "MobilePhoneNumber"
            case partyType = "PartyType"
            case personalEmailAddress = "PersonalEmailAddress"
            case phoneNumber = "PhoneNumber"
            case profileId = "ProfileId"
            case shippingAddress = "ShippingAddress"
        }
    }

    public struct PutIntegrationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// The configuration that controls how Customer Profiles retrieves data from the source.
        public let flowDefinition: FlowDefinition?
        /// The name of the profile object type.
        public let objectTypeName: String?
        /// A map in which each key is an event type from an external application such as Segment or Shopify, and each value is an ObjectTypeName (template) used to ingest the event.
        /// It supports the following event types: SegmentIdentify, ShopifyCreateCustomers, ShopifyUpdateCustomers, ShopifyCreateDraftOrders,
        /// ShopifyUpdateDraftOrders, ShopifyCreateOrders, and ShopifyUpdatedOrders.
        public let objectTypeNames: [String: String]?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?
        /// The URI of the S3 bucket or any other type of data source.
        public let uri: String?

        public init(domainName: String, flowDefinition: FlowDefinition? = nil, objectTypeName: String? = nil, objectTypeNames: [String: String]? = nil, tags: [String: String]? = nil, uri: String? = nil) {
            self.domainName = domainName
            self.flowDefinition = flowDefinition
            self.objectTypeName = objectTypeName
            self.objectTypeNames = objectTypeNames
            self.tags = tags
            self.uri = uri
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.flowDefinition?.validate(name: "\(name).flowDefinition")
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, max: 255)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, min: 1)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z_0-9-]*$")
            try self.objectTypeNames?.forEach {
                try validate($0.key, name: "objectTypeNames.key", parent: name, max: 255)
                try validate($0.key, name: "objectTypeNames.key", parent: name, min: 1)
                try validate($0.value, name: "objectTypeNames[\"\($0.key)\"]", parent: name, max: 255)
                try validate($0.value, name: "objectTypeNames[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "objectTypeNames[\"\($0.key)\"]", parent: name, pattern: "^[a-zA-Z_][a-zA-Z_0-9-]*$")
            }
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
            try self.validate(self.uri, name: "uri", parent: name, max: 255)
            try self.validate(self.uri, name: "uri", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case flowDefinition = "FlowDefinition"
            case objectTypeName = "ObjectTypeName"
            case objectTypeNames = "ObjectTypeNames"
            case tags = "Tags"
            case uri = "Uri"
        }
    }

    public struct PutIntegrationResponse: AWSDecodableShape {
        /// The timestamp of when the domain was created.
        public let createdAt: Date
        /// The unique name of the domain.
        public let domainName: String
        /// Boolean to indicate if the Flow associated with the Integration is created via Appflow  console or with ObjectTypeName equals _unstructured via API/CLI in flowDefinition
        public let isUnstructured: Bool?
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date
        /// The name of the profile object type.
        public let objectTypeName: String?
        /// A map in which each key is an event type from an external application such as Segment or Shopify, and each value is an ObjectTypeName (template) used to ingest the event.
        /// It supports the following event types: SegmentIdentify, ShopifyCreateCustomers, ShopifyUpdateCustomers, ShopifyCreateDraftOrders,
        /// ShopifyUpdateDraftOrders, ShopifyCreateOrders, and ShopifyUpdatedOrders.
        public let objectTypeNames: [String: String]?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?
        /// The URI of the S3 bucket or any other type of data source.
        public let uri: String
        /// Unique identifier for the workflow.
        public let workflowId: String?

        public init(createdAt: Date, domainName: String, isUnstructured: Bool? = nil, lastUpdatedAt: Date, objectTypeName: String? = nil, objectTypeNames: [String: String]? = nil, tags: [String: String]? = nil, uri: String, workflowId: String? = nil) {
            self.createdAt = createdAt
            self.domainName = domainName
            self.isUnstructured = isUnstructured
            self.lastUpdatedAt = lastUpdatedAt
            self.objectTypeName = objectTypeName
            self.objectTypeNames = objectTypeNames
            self.tags = tags
            self.uri = uri
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case domainName = "DomainName"
            case isUnstructured = "IsUnstructured"
            case lastUpdatedAt = "LastUpdatedAt"
            case objectTypeName = "ObjectTypeName"
            case objectTypeNames = "ObjectTypeNames"
            case tags = "Tags"
            case uri = "Uri"
            case workflowId = "WorkflowId"
        }
    }

    public struct PutProfileObjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The unique name of the domain.
        public let domainName: String
        /// A string that is serialized from a JSON object.
        public let object: String
        /// The name of the profile object type.
        public let objectTypeName: String

        public init(domainName: String, object: String, objectTypeName: String) {
            self.domainName = domainName
            self.object = object
            self.objectTypeName = objectTypeName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.object, name: "object", parent: name, max: 256_000)
            try self.validate(self.object, name: "object", parent: name, min: 1)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, max: 255)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, min: 1)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z_0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case object = "Object"
            case objectTypeName = "ObjectTypeName"
        }
    }

    public struct PutProfileObjectResponse: AWSDecodableShape {
        /// The unique identifier of the profile object generated by the service.
        public let profileObjectUniqueKey: String?

        public init(profileObjectUniqueKey: String? = nil) {
            self.profileObjectUniqueKey = profileObjectUniqueKey
        }

        private enum CodingKeys: String, CodingKey {
            case profileObjectUniqueKey = "ProfileObjectUniqueKey"
        }
    }

    public struct PutProfileObjectTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "objectTypeName", location: .uri("ObjectTypeName"))
        ]

        /// Indicates whether a profile should be created when data is received if one doesn’t exist for an object of this type. The default is FALSE. If the AllowProfileCreation flag is set to FALSE, then the service tries to fetch a standard profile and associate this object with the profile. If it is set to TRUE, and if no match is found, then the service creates a new standard profile.
        public let allowProfileCreation: Bool?
        /// Description of the profile object type.
        public let description: String
        /// The unique name of the domain.
        public let domainName: String
        /// The customer-provided key to encrypt the profile object that will be created in this profile object type.
        public let encryptionKey: String?
        /// The number of days until the data in the object expires.
        public let expirationDays: Int?
        /// A map of the name and ObjectType field.
        public let fields: [String: ObjectTypeField]?
        /// A list of unique keys that can be used to map data to the profile.
        public let keys: [String: [ObjectTypeKey]]?
        /// The name of the profile object type.
        public let objectTypeName: String
        /// The format of your sourceLastUpdatedTimestamp that was previously set up.
        public let sourceLastUpdatedTimestampFormat: String?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?
        /// A unique identifier for the object template. For some attributes in the request, the service will use the default value from the object template when TemplateId is present. If these attributes are present in the request, the service may return a BadRequestException.  These attributes include: AllowProfileCreation, SourceLastUpdatedTimestampFormat,  Fields, and Keys. For example, if AllowProfileCreation is set to true when TemplateId is set, the service may return a BadRequestException.
        public let templateId: String?

        public init(allowProfileCreation: Bool? = nil, description: String, domainName: String, encryptionKey: String? = nil, expirationDays: Int? = nil, fields: [String: ObjectTypeField]? = nil, keys: [String: [ObjectTypeKey]]? = nil, objectTypeName: String, sourceLastUpdatedTimestampFormat: String? = nil, tags: [String: String]? = nil, templateId: String? = nil) {
            self.allowProfileCreation = allowProfileCreation
            self.description = description
            self.domainName = domainName
            self.encryptionKey = encryptionKey
            self.expirationDays = expirationDays
            self.fields = fields
            self.keys = keys
            self.objectTypeName = objectTypeName
            self.sourceLastUpdatedTimestampFormat = sourceLastUpdatedTimestampFormat
            self.tags = tags
            self.templateId = templateId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.encryptionKey, name: "encryptionKey", parent: name, max: 255)
            try self.validate(self.expirationDays, name: "expirationDays", parent: name, max: 1098)
            try self.validate(self.expirationDays, name: "expirationDays", parent: name, min: 1)
            try self.fields?.forEach {
                try validate($0.key, name: "fields.key", parent: name, max: 64)
                try validate($0.key, name: "fields.key", parent: name, min: 1)
                try validate($0.key, name: "fields.key", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
                try $0.value.validate(name: "\(name).fields[\"\($0.key)\"]")
            }
            try self.keys?.forEach {
                try validate($0.key, name: "keys.key", parent: name, max: 64)
                try validate($0.key, name: "keys.key", parent: name, min: 1)
                try validate($0.key, name: "keys.key", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            }
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, max: 255)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, min: 1)
            try self.validate(self.objectTypeName, name: "objectTypeName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z_0-9-]*$")
            try self.validate(self.sourceLastUpdatedTimestampFormat, name: "sourceLastUpdatedTimestampFormat", parent: name, max: 255)
            try self.validate(self.sourceLastUpdatedTimestampFormat, name: "sourceLastUpdatedTimestampFormat", parent: name, min: 1)
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, max: 64)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case allowProfileCreation = "AllowProfileCreation"
            case description = "Description"
            case encryptionKey = "EncryptionKey"
            case expirationDays = "ExpirationDays"
            case fields = "Fields"
            case keys = "Keys"
            case sourceLastUpdatedTimestampFormat = "SourceLastUpdatedTimestampFormat"
            case tags = "Tags"
            case templateId = "TemplateId"
        }
    }

    public struct PutProfileObjectTypeResponse: AWSDecodableShape {
        /// Indicates whether a profile should be created when data is received if one doesn’t exist for an object of this type. The default is FALSE. If the AllowProfileCreation flag is set to FALSE, then the service tries to fetch a standard profile and associate this object with the profile. If it is set to TRUE, and if no match is found, then the service creates a new standard profile.
        public let allowProfileCreation: Bool?
        /// The timestamp of when the domain was created.
        public let createdAt: Date?
        /// Description of the profile object type.
        public let description: String
        /// The customer-provided key to encrypt the profile object that will be created in this profile object type.
        public let encryptionKey: String?
        /// The number of days until the data in the object expires.
        public let expirationDays: Int?
        /// A map of the name and ObjectType field.
        public let fields: [String: ObjectTypeField]?
        /// A list of unique keys that can be used to map data to the profile.
        public let keys: [String: [ObjectTypeKey]]?
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date?
        /// The name of the profile object type.
        public let objectTypeName: String
        /// The format of your sourceLastUpdatedTimestamp that was previously set up in fields that were parsed using SimpleDateFormat. If you have sourceLastUpdatedTimestamp in your field, you must set up sourceLastUpdatedTimestampFormat.
        public let sourceLastUpdatedTimestampFormat: String?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?
        /// A unique identifier for the object template.
        public let templateId: String?

        public init(allowProfileCreation: Bool? = nil, createdAt: Date? = nil, description: String, encryptionKey: String? = nil, expirationDays: Int? = nil, fields: [String: ObjectTypeField]? = nil, keys: [String: [ObjectTypeKey]]? = nil, lastUpdatedAt: Date? = nil, objectTypeName: String, sourceLastUpdatedTimestampFormat: String? = nil, tags: [String: String]? = nil, templateId: String? = nil) {
            self.allowProfileCreation = allowProfileCreation
            self.createdAt = createdAt
            self.description = description
            self.encryptionKey = encryptionKey
            self.expirationDays = expirationDays
            self.fields = fields
            self.keys = keys
            self.lastUpdatedAt = lastUpdatedAt
            self.objectTypeName = objectTypeName
            self.sourceLastUpdatedTimestampFormat = sourceLastUpdatedTimestampFormat
            self.tags = tags
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case allowProfileCreation = "AllowProfileCreation"
            case createdAt = "CreatedAt"
            case description = "Description"
            case encryptionKey = "EncryptionKey"
            case expirationDays = "ExpirationDays"
            case fields = "Fields"
            case keys = "Keys"
            case lastUpdatedAt = "LastUpdatedAt"
            case objectTypeName = "ObjectTypeName"
            case sourceLastUpdatedTimestampFormat = "SourceLastUpdatedTimestampFormat"
            case tags = "Tags"
            case templateId = "TemplateId"
        }
    }

    public struct S3ExportingConfig: AWSEncodableShape & AWSDecodableShape {
        /// The name of the S3 bucket where Identity Resolution Jobs write result files.
        public let s3BucketName: String
        /// The S3 key name of the location where Identity Resolution Jobs write result files.
        public let s3KeyName: String?

        public init(s3BucketName: String, s3KeyName: String? = nil) {
            self.s3BucketName = s3BucketName
            self.s3KeyName = s3KeyName
        }

        public func validate(name: String) throws {
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, max: 63)
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, min: 3)
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, pattern: "^[a-z0-9.-]+$")
            try self.validate(self.s3KeyName, name: "s3KeyName", parent: name, max: 800)
            try self.validate(self.s3KeyName, name: "s3KeyName", parent: name, min: 1)
            try self.validate(self.s3KeyName, name: "s3KeyName", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case s3BucketName = "S3BucketName"
            case s3KeyName = "S3KeyName"
        }
    }

    public struct S3ExportingLocation: AWSDecodableShape {
        /// The name of the S3 bucket name where Identity Resolution Jobs write result files.
        public let s3BucketName: String?
        /// The S3 key name of the location where Identity Resolution Jobs write result files.
        public let s3KeyName: String?

        public init(s3BucketName: String? = nil, s3KeyName: String? = nil) {
            self.s3BucketName = s3BucketName
            self.s3KeyName = s3KeyName
        }

        private enum CodingKeys: String, CodingKey {
            case s3BucketName = "S3BucketName"
            case s3KeyName = "S3KeyName"
        }
    }

    public struct S3SourceProperties: AWSEncodableShape {
        /// The Amazon S3 bucket name where the source files are stored.
        public let bucketName: String
        /// The object key for the Amazon S3 bucket in which the source files are stored.
        public let bucketPrefix: String?

        public init(bucketName: String, bucketPrefix: String? = nil) {
            self.bucketName = bucketName
            self.bucketPrefix = bucketPrefix
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketName, name: "bucketName", parent: name, max: 63)
            try self.validate(self.bucketName, name: "bucketName", parent: name, min: 3)
            try self.validate(self.bucketName, name: "bucketName", parent: name, pattern: "^\\S+$")
            try self.validate(self.bucketPrefix, name: "bucketPrefix", parent: name, max: 512)
            try self.validate(self.bucketPrefix, name: "bucketPrefix", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketName = "BucketName"
            case bucketPrefix = "BucketPrefix"
        }
    }

    public struct SalesforceSourceProperties: AWSEncodableShape {
        /// The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.
        public let enableDynamicFieldUpdate: Bool?
        /// Indicates whether Amazon AppFlow includes deleted files in the flow run.
        public let includeDeletedRecords: Bool?
        /// The object specified in the Salesforce flow source.
        public let object: String

        public init(enableDynamicFieldUpdate: Bool? = nil, includeDeletedRecords: Bool? = nil, object: String) {
            self.enableDynamicFieldUpdate = enableDynamicFieldUpdate
            self.includeDeletedRecords = includeDeletedRecords
            self.object = object
        }

        public func validate(name: String) throws {
            try self.validate(self.object, name: "object", parent: name, max: 512)
            try self.validate(self.object, name: "object", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case enableDynamicFieldUpdate = "EnableDynamicFieldUpdate"
            case includeDeletedRecords = "IncludeDeletedRecords"
            case object = "Object"
        }
    }

    public struct ScheduledTriggerProperties: AWSEncodableShape {
        /// Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each flow run.
        public let dataPullMode: DataPullMode?
        /// Specifies the date range for the records to import from the connector in the first flow run.
        public let firstExecutionFrom: Date?
        /// Specifies the scheduled end time for a scheduled-trigger flow.
        public let scheduleEndTime: Date?
        /// The scheduling expression that determines the rate at which the schedule will run, for example rate (5 minutes).
        public let scheduleExpression: String
        /// Specifies the optional offset that is added to the time interval for a schedule-triggered flow.
        public let scheduleOffset: Int64?
        /// Specifies the scheduled start time for a scheduled-trigger flow.
        public let scheduleStartTime: Date?
        /// Specifies the time zone used when referring to the date and time of a scheduled-triggered flow, such as America/New_York.
        public let timezone: String?

        public init(dataPullMode: DataPullMode? = nil, firstExecutionFrom: Date? = nil, scheduleEndTime: Date? = nil, scheduleExpression: String, scheduleOffset: Int64? = nil, scheduleStartTime: Date? = nil, timezone: String? = nil) {
            self.dataPullMode = dataPullMode
            self.firstExecutionFrom = firstExecutionFrom
            self.scheduleEndTime = scheduleEndTime
            self.scheduleExpression = scheduleExpression
            self.scheduleOffset = scheduleOffset
            self.scheduleStartTime = scheduleStartTime
            self.timezone = timezone
        }

        public func validate(name: String) throws {
            try self.validate(self.scheduleExpression, name: "scheduleExpression", parent: name, max: 256)
            try self.validate(self.scheduleExpression, name: "scheduleExpression", parent: name, pattern: ".*")
            try self.validate(self.scheduleOffset, name: "scheduleOffset", parent: name, max: 36000)
            try self.validate(self.scheduleOffset, name: "scheduleOffset", parent: name, min: 0)
            try self.validate(self.timezone, name: "timezone", parent: name, max: 256)
            try self.validate(self.timezone, name: "timezone", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case dataPullMode = "DataPullMode"
            case firstExecutionFrom = "FirstExecutionFrom"
            case scheduleEndTime = "ScheduleEndTime"
            case scheduleExpression = "ScheduleExpression"
            case scheduleOffset = "ScheduleOffset"
            case scheduleStartTime = "ScheduleStartTime"
            case timezone = "Timezone"
        }
    }

    public struct SearchProfilesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("max-results")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("next-token"))
        ]

        /// A list of AdditionalSearchKey objects that are each searchable identifiers of a profile. Each AdditionalSearchKey object contains a KeyName and a list of Values associated with that specific key (i.e., a key-value(s) pair). These additional search keys will be used in conjunction with the LogicalOperator and the required KeyName and Values parameters to search for profiles that satisfy the search criteria.
        public let additionalSearchKeys: [AdditionalSearchKey]?
        /// The unique name of the domain.
        public let domainName: String
        /// A searchable identifier of a customer profile. The predefined keys you can use to search include: _account, _profileId, _assetId, _caseId, _orderId, _fullName, _phone, _email, _ctrContactId, _marketoLeadId, _salesforceAccountId, _salesforceContactId, _salesforceAssetId, _zendeskUserId, _zendeskExternalId, _zendeskTicketId, _serviceNowSystemId, _serviceNowIncidentId, _segmentUserId, _shopifyCustomerId, _shopifyOrderId.
        public let keyName: String
        /// Relationship between all specified search keys that will be used to search for profiles. This includes the required KeyName and Values parameters as well as any key-value(s) pairs specified in the AdditionalSearchKeys list. This parameter influences which profiles will be returned in the response in the following manner:    AND - The response only includes profiles that match all of the search keys.    OR - The response includes profiles that match at least one of the search keys.   The OR relationship is the default behavior if this parameter is not included in the request.
        public let logicalOperator: LogicalOperator?
        /// The maximum number of objects returned per page. The default is 20 if this parameter is not included in the request.
        public let maxResults: Int?
        /// The pagination token from the previous SearchProfiles API call.
        public let nextToken: String?
        /// A list of key values.
        public let values: [String]

        public init(additionalSearchKeys: [AdditionalSearchKey]? = nil, domainName: String, keyName: String, logicalOperator: LogicalOperator? = nil, maxResults: Int? = nil, nextToken: String? = nil, values: [String]) {
            self.additionalSearchKeys = additionalSearchKeys
            self.domainName = domainName
            self.keyName = keyName
            self.logicalOperator = logicalOperator
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.values = values
        }

        public func validate(name: String) throws {
            try self.additionalSearchKeys?.forEach {
                try $0.validate(name: "\(name).additionalSearchKeys[]")
            }
            try self.validate(self.additionalSearchKeys, name: "additionalSearchKeys", parent: name, max: 4)
            try self.validate(self.additionalSearchKeys, name: "additionalSearchKeys", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.keyName, name: "keyName", parent: name, max: 64)
            try self.validate(self.keyName, name: "keyName", parent: name, min: 1)
            try self.validate(self.keyName, name: "keyName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 255)
                try validate($0, name: "values[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case additionalSearchKeys = "AdditionalSearchKeys"
            case keyName = "KeyName"
            case logicalOperator = "LogicalOperator"
            case values = "Values"
        }
    }

    public struct SearchProfilesResponse: AWSDecodableShape {
        /// The list of Profiles matching the search criteria.
        public let items: [Profile]?
        /// The pagination token from the previous SearchProfiles API call.
        public let nextToken: String?

        public init(items: [Profile]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items = "Items"
            case nextToken = "NextToken"
        }
    }

    public struct ServiceNowSourceProperties: AWSEncodableShape {
        /// The object specified in the ServiceNow flow source.
        public let object: String

        public init(object: String) {
            self.object = object
        }

        public func validate(name: String) throws {
            try self.validate(self.object, name: "object", parent: name, max: 512)
            try self.validate(self.object, name: "object", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case object = "Object"
        }
    }

    public struct SourceConnectorProperties: AWSEncodableShape {
        /// The properties that are applied when Marketo is being used as a source.
        public let marketo: MarketoSourceProperties?
        /// The properties that are applied when Amazon S3 is being used as the flow source.
        public let s3: S3SourceProperties?
        /// The properties that are applied when Salesforce is being used as a source.
        public let salesforce: SalesforceSourceProperties?
        /// The properties that are applied when ServiceNow is being used as a source.
        public let serviceNow: ServiceNowSourceProperties?
        /// The properties that are applied when using Zendesk as a flow source.
        public let zendesk: ZendeskSourceProperties?

        public init(marketo: MarketoSourceProperties? = nil, s3: S3SourceProperties? = nil, salesforce: SalesforceSourceProperties? = nil, serviceNow: ServiceNowSourceProperties? = nil, zendesk: ZendeskSourceProperties? = nil) {
            self.marketo = marketo
            self.s3 = s3
            self.salesforce = salesforce
            self.serviceNow = serviceNow
            self.zendesk = zendesk
        }

        public func validate(name: String) throws {
            try self.marketo?.validate(name: "\(name).marketo")
            try self.s3?.validate(name: "\(name).s3")
            try self.salesforce?.validate(name: "\(name).salesforce")
            try self.serviceNow?.validate(name: "\(name).serviceNow")
            try self.zendesk?.validate(name: "\(name).zendesk")
        }

        private enum CodingKeys: String, CodingKey {
            case marketo = "Marketo"
            case s3 = "S3"
            case salesforce = "Salesforce"
            case serviceNow = "ServiceNow"
            case zendesk = "Zendesk"
        }
    }

    public struct SourceFlowConfig: AWSEncodableShape {
        /// The name of the AppFlow connector profile. This name must be unique for each connector profile in the AWS account.
        public let connectorProfileName: String?
        /// The type of connector, such as Salesforce, Marketo, and so on.
        public let connectorType: SourceConnectorType
        /// Defines the configuration for a scheduled incremental data pull. If a valid configuration is provided, the fields specified in the configuration are used when querying for the incremental data pull.
        public let incrementalPullConfig: IncrementalPullConfig?
        /// Specifies the information that is required to query a particular source connector.
        public let sourceConnectorProperties: SourceConnectorProperties

        public init(connectorProfileName: String? = nil, connectorType: SourceConnectorType, incrementalPullConfig: IncrementalPullConfig? = nil, sourceConnectorProperties: SourceConnectorProperties) {
            self.connectorProfileName = connectorProfileName
            self.connectorType = connectorType
            self.incrementalPullConfig = incrementalPullConfig
            self.sourceConnectorProperties = sourceConnectorProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.connectorProfileName, name: "connectorProfileName", parent: name, max: 256)
            try self.validate(self.connectorProfileName, name: "connectorProfileName", parent: name, pattern: "^[\\w/!@#+=.-]+$")
            try self.incrementalPullConfig?.validate(name: "\(name).incrementalPullConfig")
            try self.sourceConnectorProperties.validate(name: "\(name).sourceConnectorProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case connectorProfileName = "ConnectorProfileName"
            case connectorType = "ConnectorType"
            case incrementalPullConfig = "IncrementalPullConfig"
            case sourceConnectorProperties = "SourceConnectorProperties"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The ARN of the resource that you're adding tags to.
        public let resourceArn: String
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]

        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[a-z0-9]{1,10}:profile$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct Task: AWSEncodableShape {
        /// The operation to be performed on the provided source fields.
        public let connectorOperator: ConnectorOperator?
        /// A field in a destination connector, or a field value against which Amazon AppFlow validates a source field.
        public let destinationField: String?
        /// The source fields to which a particular task is applied.
        public let sourceFields: [String]
        /// A map used to store task-related information. The service looks for particular information based on the TaskType.
        public let taskProperties: [OperatorPropertiesKeys: String]?
        /// Specifies the particular task implementation that Amazon AppFlow performs.
        public let taskType: TaskType

        public init(connectorOperator: ConnectorOperator? = nil, destinationField: String? = nil, sourceFields: [String], taskProperties: [OperatorPropertiesKeys: String]? = nil, taskType: TaskType) {
            self.connectorOperator = connectorOperator
            self.destinationField = destinationField
            self.sourceFields = sourceFields
            self.taskProperties = taskProperties
            self.taskType = taskType
        }

        public func validate(name: String) throws {
            try self.validate(self.destinationField, name: "destinationField", parent: name, max: 256)
            try self.validate(self.destinationField, name: "destinationField", parent: name, pattern: ".*")
            try self.sourceFields.forEach {
                try validate($0, name: "sourceFields[]", parent: name, max: 2048)
                try validate($0, name: "sourceFields[]", parent: name, pattern: ".*")
            }
            try self.taskProperties?.forEach {
                try validate($0.value, name: "taskProperties[\"\($0.key)\"]", parent: name, max: 2048)
                try validate($0.value, name: "taskProperties[\"\($0.key)\"]", parent: name, pattern: "^.+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case connectorOperator = "ConnectorOperator"
            case destinationField = "DestinationField"
            case sourceFields = "SourceFields"
            case taskProperties = "TaskProperties"
            case taskType = "TaskType"
        }
    }

    public struct TriggerConfig: AWSEncodableShape {
        /// Specifies the configuration details of a schedule-triggered flow that you define. Currently, these settings only apply to the Scheduled trigger type.
        public let triggerProperties: TriggerProperties?
        /// Specifies the type of flow trigger. It can be OnDemand, Scheduled, or Event.
        public let triggerType: TriggerType

        public init(triggerProperties: TriggerProperties? = nil, triggerType: TriggerType) {
            self.triggerProperties = triggerProperties
            self.triggerType = triggerType
        }

        public func validate(name: String) throws {
            try self.triggerProperties?.validate(name: "\(name).triggerProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case triggerProperties = "TriggerProperties"
            case triggerType = "TriggerType"
        }
    }

    public struct TriggerProperties: AWSEncodableShape {
        /// Specifies the configuration details of a schedule-triggered flow that you define.
        public let scheduled: ScheduledTriggerProperties?

        public init(scheduled: ScheduledTriggerProperties? = nil) {
            self.scheduled = scheduled
        }

        public func validate(name: String) throws {
            try self.scheduled?.validate(name: "\(name).scheduled")
        }

        private enum CodingKeys: String, CodingKey {
            case scheduled = "Scheduled"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring("tagKeys"))
        ]

        /// The ARN of the resource from which you are removing tags.
        public let resourceArn: String
        /// The list of tag keys to remove from the resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[a-z0-9]{1,10}:profile$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAddress: AWSEncodableShape {
        /// The first line of a customer address.
        public let address1: String?
        /// The second line of a customer address.
        public let address2: String?
        /// The third line of a customer address.
        public let address3: String?
        /// The fourth line of a customer address.
        public let address4: String?
        /// The city in which a customer lives.
        public let city: String?
        /// The country in which a customer lives.
        public let country: String?
        /// The county in which a customer lives.
        public let county: String?
        /// The postal code of a customer address.
        public let postalCode: String?
        /// The province in which a customer lives.
        public let province: String?
        /// The state in which a customer lives.
        public let state: String?

        public init(address1: String? = nil, address2: String? = nil, address3: String? = nil, address4: String? = nil, city: String? = nil, country: String? = nil, county: String? = nil, postalCode: String? = nil, province: String? = nil, state: String? = nil) {
            self.address1 = address1
            self.address2 = address2
            self.address3 = address3
            self.address4 = address4
            self.city = city
            self.country = country
            self.county = county
            self.postalCode = postalCode
            self.province = province
            self.state = state
        }

        public func validate(name: String) throws {
            try self.validate(self.address1, name: "address1", parent: name, max: 255)
            try self.validate(self.address2, name: "address2", parent: name, max: 255)
            try self.validate(self.address3, name: "address3", parent: name, max: 255)
            try self.validate(self.address4, name: "address4", parent: name, max: 255)
            try self.validate(self.city, name: "city", parent: name, max: 255)
            try self.validate(self.country, name: "country", parent: name, max: 255)
            try self.validate(self.county, name: "county", parent: name, max: 255)
            try self.validate(self.postalCode, name: "postalCode", parent: name, max: 255)
            try self.validate(self.province, name: "province", parent: name, max: 255)
            try self.validate(self.state, name: "state", parent: name, max: 255)
        }

        private enum CodingKeys: String, CodingKey {
            case address1 = "Address1"
            case address2 = "Address2"
            case address3 = "Address3"
            case address4 = "Address4"
            case city = "City"
            case country = "Country"
            case county = "County"
            case postalCode = "PostalCode"
            case province = "Province"
            case state = "State"
        }
    }

    public struct UpdateDomainRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. If specified as an empty string, it will clear any existing value. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.
        public let deadLetterQueueUrl: String?
        /// The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage. If specified as an empty string, it will clear any existing value.
        public let defaultEncryptionKey: String?
        /// The default number of days until the data within the domain expires.
        public let defaultExpirationDays: Int?
        /// The unique name of the domain.
        public let domainName: String
        /// The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly
        /// batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every
        /// Saturday at 12AM UTC to detect duplicate profiles in your domains.  After the Identity Resolution Job completes, use the
        /// GetMatches
        /// API to return and review the results. Or, if you have configured ExportingConfig in the MatchingRequest, you can download the results from
        /// S3.
        public let matching: MatchingRequest?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?

        public init(deadLetterQueueUrl: String? = nil, defaultEncryptionKey: String? = nil, defaultExpirationDays: Int? = nil, domainName: String, matching: MatchingRequest? = nil, tags: [String: String]? = nil) {
            self.deadLetterQueueUrl = deadLetterQueueUrl
            self.defaultEncryptionKey = defaultEncryptionKey
            self.defaultExpirationDays = defaultExpirationDays
            self.domainName = domainName
            self.matching = matching
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.deadLetterQueueUrl, name: "deadLetterQueueUrl", parent: name, max: 255)
            try self.validate(self.defaultEncryptionKey, name: "defaultEncryptionKey", parent: name, max: 255)
            try self.validate(self.defaultExpirationDays, name: "defaultExpirationDays", parent: name, max: 1098)
            try self.validate(self.defaultExpirationDays, name: "defaultExpirationDays", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.matching?.validate(name: "\(name).matching")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deadLetterQueueUrl = "DeadLetterQueueUrl"
            case defaultEncryptionKey = "DefaultEncryptionKey"
            case defaultExpirationDays = "DefaultExpirationDays"
            case matching = "Matching"
            case tags = "Tags"
        }
    }

    public struct UpdateDomainResponse: AWSDecodableShape {
        /// The timestamp of when the domain was created.
        public let createdAt: Date
        /// The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications.
        public let deadLetterQueueUrl: String?
        /// The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage.
        public let defaultEncryptionKey: String?
        /// The default number of days until the data within the domain expires.
        public let defaultExpirationDays: Int?
        /// The unique name of the domain.
        public let domainName: String
        /// The timestamp of when the domain was most recently edited.
        public let lastUpdatedAt: Date
        /// The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly
        /// batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every
        /// Saturday at 12AM UTC to detect duplicate profiles in your domains.  After the Identity Resolution Job completes, use the
        /// GetMatches
        /// API to return and review the results. Or, if you have configured ExportingConfig in the MatchingRequest, you can download the results from
        /// S3.
        public let matching: MatchingResponse?
        /// The tags used to organize, track, or control access for this resource.
        public let tags: [String: String]?

        public init(createdAt: Date, deadLetterQueueUrl: String? = nil, defaultEncryptionKey: String? = nil, defaultExpirationDays: Int? = nil, domainName: String, lastUpdatedAt: Date, matching: MatchingResponse? = nil, tags: [String: String]? = nil) {
            self.createdAt = createdAt
            self.deadLetterQueueUrl = deadLetterQueueUrl
            self.defaultEncryptionKey = defaultEncryptionKey
            self.defaultExpirationDays = defaultExpirationDays
            self.domainName = domainName
            self.lastUpdatedAt = lastUpdatedAt
            self.matching = matching
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case deadLetterQueueUrl = "DeadLetterQueueUrl"
            case defaultEncryptionKey = "DefaultEncryptionKey"
            case defaultExpirationDays = "DefaultExpirationDays"
            case domainName = "DomainName"
            case lastUpdatedAt = "LastUpdatedAt"
            case matching = "Matching"
            case tags = "Tags"
        }
    }

    public struct UpdateProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri("DomainName"))
        ]

        /// A unique account number that you have given to the customer.
        public let accountNumber: String?
        /// Any additional information relevant to the customer’s profile.
        public let additionalInformation: String?
        /// A generic address associated with the customer that is not mailing, shipping, or billing.
        public let address: UpdateAddress?
        /// A key value pair of attributes of a customer profile.
        public let attributes: [String: String]?
        /// The customer’s billing address.
        public let billingAddress: UpdateAddress?
        /// The customer’s birth date.
        public let birthDate: String?
        /// The customer’s business email address.
        public let businessEmailAddress: String?
        /// The name of the customer’s business.
        public let businessName: String?
        /// The customer’s business phone number.
        public let businessPhoneNumber: String?
        /// The unique name of the domain.
        public let domainName: String
        /// The customer’s email address, which has not been specified as a personal or business address.
        public let emailAddress: String?
        /// The customer’s first name.
        public let firstName: String?
        /// The gender with which the customer identifies.
        public let gender: Gender?
        /// An alternative to Gender which accepts any string as input.
        public let genderString: String?
        /// The customer’s home phone number.
        public let homePhoneNumber: String?
        /// The customer’s last name.
        public let lastName: String?
        /// The customer’s mailing address.
        public let mailingAddress: UpdateAddress?
        /// The customer’s middle name.
        public let middleName: String?
        /// The customer’s mobile phone number.
        public let mobilePhoneNumber: String?
        /// The type of profile used to describe the customer.
        public let partyType: PartyType?
        /// An alternative to PartyType which accepts any string as input.
        public let partyTypeString: String?
        /// The customer’s personal email address.
        public let personalEmailAddress: String?
        /// The customer’s phone number, which has not been specified as a mobile, home, or business number.
        public let phoneNumber: String?
        /// The unique identifier of a customer profile.
        public let profileId: String
        /// The customer’s shipping address.
        public let shippingAddress: UpdateAddress?

        public init(accountNumber: String? = nil, additionalInformation: String? = nil, address: UpdateAddress? = nil, attributes: [String: String]? = nil, billingAddress: UpdateAddress? = nil, birthDate: String? = nil, businessEmailAddress: String? = nil, businessName: String? = nil, businessPhoneNumber: String? = nil, domainName: String, emailAddress: String? = nil, firstName: String? = nil, gender: Gender? = nil, genderString: String? = nil, homePhoneNumber: String? = nil, lastName: String? = nil, mailingAddress: UpdateAddress? = nil, middleName: String? = nil, mobilePhoneNumber: String? = nil, partyType: PartyType? = nil, partyTypeString: String? = nil, personalEmailAddress: String? = nil, phoneNumber: String? = nil, profileId: String, shippingAddress: UpdateAddress? = nil) {
            self.accountNumber = accountNumber
            self.additionalInformation = additionalInformation
            self.address = address
            self.attributes = attributes
            self.billingAddress = billingAddress
            self.birthDate = birthDate
            self.businessEmailAddress = businessEmailAddress
            self.businessName = businessName
            self.businessPhoneNumber = businessPhoneNumber
            self.domainName = domainName
            self.emailAddress = emailAddress
            self.firstName = firstName
            self.gender = gender
            self.genderString = genderString
            self.homePhoneNumber = homePhoneNumber
            self.lastName = lastName
            self.mailingAddress = mailingAddress
            self.middleName = middleName
            self.mobilePhoneNumber = mobilePhoneNumber
            self.partyType = partyType
            self.partyTypeString = partyTypeString
            self.personalEmailAddress = personalEmailAddress
            self.phoneNumber = phoneNumber
            self.profileId = profileId
            self.shippingAddress = shippingAddress
        }

        public func validate(name: String) throws {
            try self.validate(self.accountNumber, name: "accountNumber", parent: name, max: 255)
            try self.validate(self.additionalInformation, name: "additionalInformation", parent: name, max: 1000)
            try self.address?.validate(name: "\(name).address")
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 255)
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 255)
            }
            try self.billingAddress?.validate(name: "\(name).billingAddress")
            try self.validate(self.birthDate, name: "birthDate", parent: name, max: 255)
            try self.validate(self.businessEmailAddress, name: "businessEmailAddress", parent: name, max: 255)
            try self.validate(self.businessName, name: "businessName", parent: name, max: 255)
            try self.validate(self.businessPhoneNumber, name: "businessPhoneNumber", parent: name, max: 255)
            try self.validate(self.domainName, name: "domainName", parent: name, max: 64)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, max: 255)
            try self.validate(self.firstName, name: "firstName", parent: name, max: 255)
            try self.validate(self.genderString, name: "genderString", parent: name, max: 255)
            try self.validate(self.homePhoneNumber, name: "homePhoneNumber", parent: name, max: 255)
            try self.validate(self.lastName, name: "lastName", parent: name, max: 255)
            try self.mailingAddress?.validate(name: "\(name).mailingAddress")
            try self.validate(self.middleName, name: "middleName", parent: name, max: 255)
            try self.validate(self.mobilePhoneNumber, name: "mobilePhoneNumber", parent: name, max: 255)
            try self.validate(self.partyTypeString, name: "partyTypeString", parent: name, max: 255)
            try self.validate(self.personalEmailAddress, name: "personalEmailAddress", parent: name, max: 255)
            try self.validate(self.phoneNumber, name: "phoneNumber", parent: name, max: 255)
            try self.validate(self.profileId, name: "profileId", parent: name, pattern: "^[a-f0-9]{32}$")
            try self.shippingAddress?.validate(name: "\(name).shippingAddress")
        }

        private enum CodingKeys: String, CodingKey {
            case accountNumber = "AccountNumber"
            case additionalInformation = "AdditionalInformation"
            case address = "Address"
            case attributes = "Attributes"
            case billingAddress = "BillingAddress"
            case birthDate = "BirthDate"
            case businessEmailAddress = "BusinessEmailAddress"
            case businessName = "BusinessName"
            case businessPhoneNumber = "BusinessPhoneNumber"
            case emailAddress = "EmailAddress"
            case firstName = "FirstName"
            case gender = "Gender"
            case genderString = "GenderString"
            case homePhoneNumber = "HomePhoneNumber"
            case lastName = "LastName"
            case mailingAddress = "MailingAddress"
            case middleName = "MiddleName"
            case mobilePhoneNumber = "MobilePhoneNumber"
            case partyType = "PartyType"
            case partyTypeString = "PartyTypeString"
            case personalEmailAddress = "PersonalEmailAddress"
            case phoneNumber = "PhoneNumber"
            case profileId = "ProfileId"
            case shippingAddress = "ShippingAddress"
        }
    }

    public struct UpdateProfileResponse: AWSDecodableShape {
        /// The unique identifier of a customer profile.
        public let profileId: String

        public init(profileId: String) {
            self.profileId = profileId
        }

        private enum CodingKeys: String, CodingKey {
            case profileId = "ProfileId"
        }
    }

    public struct WorkflowAttributes: AWSDecodableShape {
        /// Workflow attributes specific to APPFLOW_INTEGRATION workflow.
        public let appflowIntegration: AppflowIntegrationWorkflowAttributes?

        public init(appflowIntegration: AppflowIntegrationWorkflowAttributes? = nil) {
            self.appflowIntegration = appflowIntegration
        }

        private enum CodingKeys: String, CodingKey {
            case appflowIntegration = "AppflowIntegration"
        }
    }

    public struct WorkflowMetrics: AWSDecodableShape {
        /// Workflow execution metrics for APPFLOW_INTEGRATION workflow.
        public let appflowIntegration: AppflowIntegrationWorkflowMetrics?

        public init(appflowIntegration: AppflowIntegrationWorkflowMetrics? = nil) {
            self.appflowIntegration = appflowIntegration
        }

        private enum CodingKeys: String, CodingKey {
            case appflowIntegration = "AppflowIntegration"
        }
    }

    public struct WorkflowStepItem: AWSDecodableShape {
        /// Workflow step information specific to APPFLOW_INTEGRATION workflow.
        public let appflowIntegration: AppflowIntegrationWorkflowStep?

        public init(appflowIntegration: AppflowIntegrationWorkflowStep? = nil) {
            self.appflowIntegration = appflowIntegration
        }

        private enum CodingKeys: String, CodingKey {
            case appflowIntegration = "AppflowIntegration"
        }
    }

    public struct ZendeskSourceProperties: AWSEncodableShape {
        /// The object specified in the Zendesk flow source.
        public let object: String

        public init(object: String) {
            self.object = object
        }

        public func validate(name: String) throws {
            try self.validate(self.object, name: "object", parent: name, max: 512)
            try self.validate(self.object, name: "object", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case object = "Object"
        }
    }
}

// MARK: - Errors

/// Error enum for CustomerProfiles
public struct CustomerProfilesErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case badRequestException = "BadRequestException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case throttlingException = "ThrottlingException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize CustomerProfiles
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You do not have sufficient access to perform this action.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// The input you provided is invalid.
    public static var badRequestException: Self { .init(.badRequestException) }
    /// An internal service error occurred.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The requested resource does not exist, or access was denied.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// You exceeded the maximum number of requests.
    public static var throttlingException: Self { .init(.throttlingException) }
}

extension CustomerProfilesErrorType: Equatable {
    public static func == (lhs: CustomerProfilesErrorType, rhs: CustomerProfilesErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension CustomerProfilesErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
